Index: LayoutTests/fast/speechsynthesis/speech-synthesis-voices.html |
diff --git a/LayoutTests/fast/speechsynthesis/speech-synthesis-voices.html b/LayoutTests/fast/speechsynthesis/speech-synthesis-voices.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ae86e976f2a59959879cec5cc92f8ce6773e8ef8 |
--- /dev/null |
+++ b/LayoutTests/fast/speechsynthesis/speech-synthesis-voices.html |
@@ -0,0 +1,41 @@ |
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
+<html> |
+<head> |
+<script src="../js/resources/js-test-pre.js"></script> |
+</head> |
+<body id="body"> |
+ |
+<div id="console"></div> |
+ |
+<script> |
+ if (window.internals) |
+ window.internals.enableMockSpeechSynthesizer(); |
+ |
+ description("This tests that we can get synthesizer voices on the Mac"); |
+ |
+ var speech = window.speechSynthesis; |
+ var list = speech.getVoices(); |
+ |
+ var foundDefaultVoice = false; |
+ var foundEnglishVoice = false; |
+ var voiceCount = list.length; |
+ |
+ for (var k = 0; k < list.length; k++ ) { |
+ var voice = list[k]; |
+ if (voice.lang == "en-US") { |
+ foundEnglishVoice = true; |
+ } |
+ if (voice.default) { |
+ foundDefaultVoice = true; |
+ } |
+ } |
+ |
+ shouldBeTrue("voiceCount > 0"); |
+ shouldBeTrue("foundEnglishVoice"); |
+ shouldBeTrue("foundDefaultVoice"); |
+ |
+</script> |
+ |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |