Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=650295 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <meta charset="utf-8"> |
michael@0 | 8 | <title>Test for Bug 650295: Web Speech API check all classes are present</title> |
michael@0 | 9 | <script type="application/javascript"> |
michael@0 | 10 | window.SimpleTest = parent.SimpleTest; |
michael@0 | 11 | window.info = parent.info; |
michael@0 | 12 | window.is = parent.is; |
michael@0 | 13 | window.isnot = parent.isnot; |
michael@0 | 14 | window.ok = parent.ok; |
michael@0 | 15 | </script> |
michael@0 | 16 | <script type="application/javascript" src="common.js"></script> |
michael@0 | 17 | </head> |
michael@0 | 18 | <body> |
michael@0 | 19 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=650295">Mozilla Bug 650295</a> |
michael@0 | 20 | <p id="display"></p> |
michael@0 | 21 | <div id="content" style="display: none"> |
michael@0 | 22 | |
michael@0 | 23 | </div> |
michael@0 | 24 | <pre id="test"> |
michael@0 | 25 | <script type="application/javascript"> |
michael@0 | 26 | |
michael@0 | 27 | /** Test for Bug 525444 **/ |
michael@0 | 28 | |
michael@0 | 29 | synthAddVoice('TestSpeechServiceWithAudio', 'Male 1', 'en-GB', true); |
michael@0 | 30 | |
michael@0 | 31 | var gotStartEvent = false; |
michael@0 | 32 | var gotBoundaryEvent = false; |
michael@0 | 33 | var utterance = new SpeechSynthesisUtterance("Hello, world!"); |
michael@0 | 34 | utterance.addEventListener('start', function(e) { |
michael@0 | 35 | ok(speechSynthesis.speaking, "speechSynthesis is speaking."); |
michael@0 | 36 | ok(!speechSynthesis.pending, "speechSynthesis has no other utterances queued."); |
michael@0 | 37 | gotStartEvent = true; |
michael@0 | 38 | }); |
michael@0 | 39 | |
michael@0 | 40 | utterance.addEventListener('end', function(e) { |
michael@0 | 41 | ok(!speechSynthesis.speaking, "speechSynthesis is not speaking."); |
michael@0 | 42 | ok(!speechSynthesis.pending, "speechSynthesis has no other utterances queued."); |
michael@0 | 43 | ok(gotStartEvent, "Got 'start' event."); |
michael@0 | 44 | info('end ' + e.elapsedTime); |
michael@0 | 45 | synthCleanup(); |
michael@0 | 46 | SimpleTest.finish(); |
michael@0 | 47 | }); |
michael@0 | 48 | |
michael@0 | 49 | speechSynthesis.speak(utterance); |
michael@0 | 50 | ok(!speechSynthesis.speaking, "speechSynthesis is not speaking yet."); |
michael@0 | 51 | ok(speechSynthesis.pending, "speechSynthesis has an utterance queued."); |
michael@0 | 52 | |
michael@0 | 53 | </script> |
michael@0 | 54 | </pre> |
michael@0 | 55 | </body> |
michael@0 | 56 | </html> |