blob: 5c7fad05cca2c30b5fa631e84e4e562e0c4adc52 [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)
window.internals.enableMockSpeechSynthesizer(document);
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>