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

Side by Side Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-uses-voice.html

Issue 38743004: Remove modules/speech dependencies from Internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: patch Created 7 years, 1 month 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
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="../js/resources/js-test-pre.js"></script> 4 <script src="../js/resources/js-test-pre.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 description("This tests that we can get synthesizer voices on the Mac"); 11 description("This tests that we can get synthesizer voices on the Mac");
12 12
13 if (window.internals) 13 if (window.internals)
14 window.internals.enableMockSpeechSynthesizer(); 14 window.internals.enableMockSpeechSynthesizer(document);
15 15
16 if (window.testRunner) 16 if (window.testRunner)
17 testRunner.waitUntilDone(); 17 testRunner.waitUntilDone();
18 18
19 window.jsTestIsAsync = true; 19 window.jsTestIsAsync = true;
20 20
21 var list = speechSynthesis.getVoices(); 21 var list = speechSynthesis.getVoices();
22 var voice = list[0]; 22 var voice = list[0];
23 23
24 // Start a very short speaking job that will finish quickly. 24 // Start a very short speaking job that will finish quickly.
25 var u = new SpeechSynthesisUtterance("this is a test string."); 25 var u = new SpeechSynthesisUtterance("this is a test string.");
26 u.voice = voice; 26 u.voice = voice;
27 27
28 debug("Verify that setting and retrieving the voice works."); 28 debug("Verify that setting and retrieving the voice works.");
29 shouldBeTrue("u.voice.name == voice.name"); 29 shouldBeTrue("u.voice.name == voice.name");
30 30
31 u.onend = function(event) { 31 u.onend = function(event) {
32 debug("Speech job finished successfully."); 32 debug("Speech job finished successfully.");
33 finishJSTest(); 33 finishJSTest();
34 } 34 }
35 35
36 speechSynthesis.speak(u); 36 speechSynthesis.speak(u);
37 37
38 </script> 38 </script>
39 39
40 <script src="../js/resources/js-test-post.js"></script> 40 <script src="../js/resources/js-test-post.js"></script>
41 </body> 41 </body>
42 </html> 42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698