OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body id="body"> | 6 <body id="body"> |
7 | 7 |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 | 9 |
10 <script> | 10 <script> |
11 | 11 |
12 if (window.internals) | 12 if (window.internals) |
13 window.internals.enableMockSpeechSynthesizer(); | 13 window.internals.enableMockSpeechSynthesizer(document); |
14 | 14 |
15 description("This tests that passing an argument other than a SpeechSynthesi
sUtterance to speechSynthesis.speak throws a TypeError exception."); | 15 description("This tests that passing an argument other than a SpeechSynthesi
sUtterance to speechSynthesis.speak throws a TypeError exception."); |
16 | 16 |
17 shouldThrow("speechSynthesis.speak()", '"TypeError: Failed to execute \'spea
k\' on \'SpeechSynthesis\': 1 argument required, but only 0 present."'); | 17 shouldThrow("speechSynthesis.speak()", '"TypeError: Failed to execute \'spea
k\' on \'SpeechSynthesis\': 1 argument required, but only 0 present."'); |
18 shouldThrow("speechSynthesis.speak(0)", '"TypeError: Invalid utterance argum
ent"'); | 18 shouldThrow("speechSynthesis.speak(0)", '"TypeError: Invalid utterance argum
ent"'); |
19 shouldThrow("speechSynthesis.speak('')", '"TypeError: Invalid utterance argu
ment"'); | 19 shouldThrow("speechSynthesis.speak('')", '"TypeError: Invalid utterance argu
ment"'); |
20 shouldThrow("speechSynthesis.speak(document.body)", '"TypeError: Invalid utt
erance argument"'); | 20 shouldThrow("speechSynthesis.speak(document.body)", '"TypeError: Invalid utt
erance argument"'); |
21 shouldThrow("speechSynthesis.speak({})", '"TypeError: Invalid utterance argu
ment"'); | 21 shouldThrow("speechSynthesis.speak({})", '"TypeError: Invalid utterance argu
ment"'); |
22 shouldThrow("speechSynthesis.speak((new SpeechSynthesisUtterance()).text = '
hello')", '"TypeError: Invalid utterance argument"'); | 22 shouldThrow("speechSynthesis.speak((new SpeechSynthesisUtterance()).text = '
hello')", '"TypeError: Invalid utterance argument"'); |
23 | 23 |
24 </script> | 24 </script> |
25 | 25 |
26 <script src="../js/resources/js-test-post.js"></script> | 26 <script src="../js/resources/js-test-post.js"></script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |