Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / speechsynthesis / speech-synthesis-gc-utterance-crash.html
blob17127222fb3fde6cfe154a802a3a6f40aa35769b
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body id="body">
8 <div id="console"></div>
10 <script>
12 if (window.internals)
13 window.internals.enableMockSpeechSynthesizer(document);
15 description("This tests that there isn't a crash if the utterance object is garbage-collected before speaking finishes.");
17 if (window.testRunner)
18 testRunner.waitUntilDone();
20 window.jsTestIsAsync = true;
22 speechSynthesis.speak(new SpeechSynthesisUtterance(" "));
23 gc();
25 window.setInterval(function() {
26 if (!speechSynthesis.speaking)
27 finishJSTest();
28 }, 10);
30 </script>
32 </body>
33 </html>