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

Side by Side Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-voices.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, 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
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 if (window.internals) 11 if (window.internals)
12 window.internals.enableMockSpeechSynthesizer(); 12 window.internals.enableMockSpeechSynthesizer(document);
13 13
14 description("This tests that we can get synthesizer voices on the Mac"); 14 description("This tests that we can get synthesizer voices on the Mac");
15 15
16 var speech = window.speechSynthesis; 16 var speech = window.speechSynthesis;
17 var list = speech.getVoices(); 17 var list = speech.getVoices();
18 18
19 var foundDefaultVoice = false; 19 var foundDefaultVoice = false;
20 var foundEnglishVoice = false; 20 var foundEnglishVoice = false;
21 var voiceCount = list.length; 21 var voiceCount = list.length;
22 22
23 for (var k = 0; k < list.length; k++ ) { 23 for (var k = 0; k < list.length; k++ ) {
24 var voice = list[k]; 24 var voice = list[k];
25 if (voice.lang == "en-US") { 25 if (voice.lang == "en-US") {
26 foundEnglishVoice = true; 26 foundEnglishVoice = true;
27 } 27 }
28 if (voice.default) { 28 if (voice.default) {
29 foundDefaultVoice = true; 29 foundDefaultVoice = true;
30 } 30 }
31 } 31 }
32 32
33 shouldBeTrue("voiceCount > 0"); 33 shouldBeTrue("voiceCount > 0");
34 shouldBeTrue("foundEnglishVoice"); 34 shouldBeTrue("foundEnglishVoice");
35 shouldBeTrue("foundDefaultVoice"); 35 shouldBeTrue("foundDefaultVoice");
36 36
37 </script> 37 </script>
38 38
39 <script src="../js/resources/js-test-post.js"></script> 39 <script src="../js/resources/js-test-post.js"></script>
40 </body> 40 </body>
41 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698