file_voiceschanged.html (827B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1254378 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1254378: Web Speech API check all classes are present</title> 9 <script type="application/javascript"> 10 window.SimpleTest = parent.SimpleTest; 11 window.is = parent.is; 12 window.isnot = parent.isnot; 13 window.ok = parent.ok; 14 </script> 15 </head> 16 <body> 17 <script type="application/javascript"> 18 19 /** Test for Bug 1254378 */ 20 21 function onVoicesChanged() { 22 isnot(speechSynthesis.getVoices().length, 0, "Voices added"); 23 speechSynthesis.removeEventListener("voiceschanged", onVoicesChanged); 24 SimpleTest.finish(); 25 } 26 27 speechSynthesis.addEventListener("voiceschanged", onVoicesChanged); 28 29 is(speechSynthesis.getVoices().length, 0, "No voices added initially"); 30 </script> 31 </body> 32 </html>