blob: 20de65a2eb246f81dbc0d566bfeb02dde5e99120 [file] [log] [blame]
<!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>