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

Side by Side Diff: chrome/test/data/extensions/api_test/tts_engine/register_engine/test.js

Issue 27034009: Implement Google network speech synthesis (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Multiple voices with the same language 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 | Annotate | Revision Log
OLDNEW
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
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 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698