file_speech_repeating_utterance.html (648B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for Bug 1305344: Utterance not repeating in Firefox</title> 6 <script type="application/javascript"> 7 window.SimpleTest = parent.SimpleTest; 8 window.ok = parent.ok; 9 </script> 10 <script src="common.js"></script> 11 </head> 12 <body> 13 <script> 14 var utterance = new SpeechSynthesisUtterance("repeating?"); 15 var counter = 0; 16 utterance.addEventListener('start', function(e) { 17 if (counter++ === 1) { 18 ok(true) 19 SimpleTest.finish(); 20 } 21 }); 22 speechSynthesis.speak(utterance); 23 speechSynthesis.speak(utterance); 24 </script> 25 </body> 26 </html>