| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // TTS api test for Chrome on ChromeOS. | 5 // TTS api test for Chrome on ChromeOS. |
| 6 // browser_tests.exe --gtest_filter="TtsApiTest.*" | 6 // browser_tests.exe --gtest_filter="TtsApiTest.*" |
| 7 | 7 |
| 8 chrome.test.runTests([ | 8 chrome.test.runTests([ |
| 9 function testNoListeners() { | 9 function testNoListeners() { |
| 10 // This call should go to native speech because we haven't registered | 10 // This call should go to native speech because we haven't registered |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 var stopListener = function() {}; | 144 var stopListener = function() {}; |
| 145 chrome.ttsEngine.onSpeak.addListener(speakListener); | 145 chrome.ttsEngine.onSpeak.addListener(speakListener); |
| 146 chrome.ttsEngine.onStop.addListener(stopListener); | 146 chrome.ttsEngine.onStop.addListener(stopListener); |
| 147 | 147 |
| 148 chrome.tts.getVoices(function(voices) { | 148 chrome.tts.getVoices(function(voices) { |
| 149 chrome.test.assertEq(2, voices.length); | 149 chrome.test.assertEq(2, voices.length); |
| 150 | 150 |
| 151 chrome.test.assertEq('Alice', voices[0].voiceName); | 151 chrome.test.assertEq('Alice', voices[0].voiceName); |
| 152 chrome.test.assertEq('en-US', voices[0].lang); | 152 chrome.test.assertEq('en-US', voices[0].lang); |
| 153 chrome.test.assertEq('female', voices[0].gender); | 153 chrome.test.assertEq('female', voices[0].gender); |
| 154 chrome.test.assertEq(false, voices[0].remote); |
| 154 | 155 |
| 155 chrome.test.assertEq('Pat', voices[1].voiceName); | 156 chrome.test.assertEq('Pat', voices[1].voiceName); |
| 156 chrome.test.assertEq('en-US', voices[1].lang); | 157 chrome.test.assertEq('en-US', voices[1].lang); |
| 158 chrome.test.assertEq(false, voices[1].remote); |
| 157 chrome.test.succeed(); | 159 chrome.test.succeed(); |
| 158 }); | 160 }); |
| 159 } | 161 } |
| 160 ]); | 162 ]); |
| OLD | NEW |