<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body id="body">
<div id="console"></div>
<script>
if (window.internals)
internals.enableMockSpeechSynthesizer(window);
description("This tests that passing an argument other than a SpeechSynthesisUtterance to speechSynthesis.speak throws a TypeError exception.");
shouldThrow("speechSynthesis.speak()");
shouldThrow("speechSynthesis.speak(0)");
shouldThrow("speechSynthesis.speak('')");
shouldThrow("speechSynthesis.speak(document.body)");
shouldThrow("speechSynthesis.speak({})");
shouldThrow("speechSynthesis.speak((new SpeechSynthesisUtterance()).text = 'hello')");
</script>
</body>
</html>