| 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="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.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(document); | 13 window.internals.enableMockSpeechSynthesizer(window); |
| 14 | 14 |
| 15 description("This tests that there isn't a crash if the utterance object is
garbage-collected before speaking finishes."); | 15 description("This tests that there isn't a crash if the utterance object is
garbage-collected before speaking finishes."); |
| 16 | 16 |
| 17 if (window.testRunner) | 17 if (window.testRunner) |
| 18 testRunner.waitUntilDone(); | 18 testRunner.waitUntilDone(); |
| 19 | 19 |
| 20 window.jsTestIsAsync = true; | 20 window.jsTestIsAsync = true; |
| 21 | 21 |
| 22 speechSynthesis.speak(new SpeechSynthesisUtterance(" ")); | 22 speechSynthesis.speak(new SpeechSynthesisUtterance(" ")); |
| 23 gc(); | 23 gc(); |
| 24 | 24 |
| 25 window.setInterval(function() { | 25 window.setInterval(function() { |
| 26 if (!speechSynthesis.speaking) | 26 if (!speechSynthesis.speaking) |
| 27 finishJSTest(); | 27 finishJSTest(); |
| 28 }, 10); | 28 }, 10); |
| 29 | 29 |
| 30 </script> | 30 </script> |
| 31 | 31 |
| 32 </body> | 32 </body> |
| 33 </html> | 33 </html> |
| OLD | NEW |