Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-speak.html

Issue 2367693003: Fix SpeechSynthesisEvent.elapsedTime (Closed)
Patch Set: Fix expectation Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-speak-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(document);
14 14
15 description("This tests that the basic mechanisms of speaking text work, inc luding sending the job and receving the callback."); 15 description("This tests that the basic mechanisms of speaking text work, inc luding sending the job and receving the callback.");
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 // Start a very short speaking job that will finish quickly. 22 // Start a very short speaking job that will finish quickly.
23 var u = new SpeechSynthesisUtterance(" "); 23 var u = new SpeechSynthesisUtterance(" ");
24 24
25 u.onstart = function(event) { 25 u.onstart = function(event) {
26 shouldBeTrue("event.elapsedTime > 0"); 26 shouldBeTrue("event.elapsedTime >= 0");
27 shouldBeTrue("event.elapsedTime < 1000");
27 shouldBeTrue("speechSynthesis.speaking"); 28 shouldBeTrue("speechSynthesis.speaking");
28 } 29 }
29 u.onend = function(event) { 30 u.onend = function(event) {
30 shouldBeTrue("event.elapsedTime > 0"); 31 shouldBeTrue("event.elapsedTime > 0");
32 shouldBeTrue("event.elapsedTime < 10000");
31 shouldBeFalse("speechSynthesis.speaking"); 33 shouldBeFalse("speechSynthesis.speaking");
32 finishJSTest(); 34 finishJSTest();
33 } 35 }
34 36
35 shouldBeFalse("speechSynthesis.speaking"); 37 shouldBeFalse("speechSynthesis.speaking");
36 speechSynthesis.speak(u); 38 speechSynthesis.speak(u);
37 39
38 </script> 40 </script>
39 41
40 </body> 42 </body>
41 </html> 43 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-speak-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698