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

Side by Side Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-voices.html

Issue 14874017: Add speech synthesizer tests (from WebKit). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div id="console"></div>
9
10 <script>
11 if (window.internals)
12 window.internals.enableMockSpeechSynthesizer();
13
14 description("This tests that we can get synthesizer voices on the Mac");
15
16 var speech = window.speechSynthesis;
17 var list = speech.getVoices();
18
19 var foundDefaultVoice = false;
20 var foundEnglishVoice = false;
21 var voiceCount = list.length;
22
23 for (var k = 0; k < list.length; k++ ) {
24 var voice = list[k];
25 if (voice.lang == "en-US") {
26 foundEnglishVoice = true;
27 }
28 if (voice.default) {
29 foundDefaultVoice = true;
30 }
31 }
32
33 shouldBeTrue("voiceCount > 0");
34 shouldBeTrue("foundEnglishVoice");
35 shouldBeTrue("foundDefaultVoice");
36
37 </script>
38
39 <script src="../js/resources/js-test-post.js"></script>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698