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

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

Issue 2364753002: Improve TTS GetMatchingVoices algorithm (Closed)
Patch Set: Address feedback Created 4 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
« no previous file with comments | « chrome/browser/speech/tts_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (event.type == 'end') { 81 if (event.type == 'end') {
82 callbacks++; 82 callbacks++;
83 } 83 }
84 } 84 }
85 }, function() { 85 }, function() {
86 chrome.test.assertNoLastError(); 86 chrome.test.assertNoLastError();
87 }); 87 });
88 chrome.tts.speak( 88 chrome.tts.speak(
89 'native speech 3', 89 'native speech 3',
90 { 90 {
91 'voiceName': 'French',
91 'lang': 'fr-FR', 92 'lang': 'fr-FR',
92 'enqueue': true, 93 'enqueue': true,
93 'onEvent': function(event) { 94 'onEvent': function(event) {
94 if (event.type == 'end') { 95 if (event.type == 'end') {
95 callbacks++; 96 callbacks++;
96 } 97 }
97 } 98 }
98 }, function() { 99 }, function() {
99 chrome.test.assertNoLastError(); 100 chrome.test.assertNoLastError();
100 }); 101 });
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 chrome.test.assertEq('Alice', voices[1].voiceName); 156 chrome.test.assertEq('Alice', voices[1].voiceName);
156 chrome.test.assertEq('en-US', voices[1].lang); 157 chrome.test.assertEq('en-US', voices[1].lang);
157 chrome.test.assertEq('female', voices[1].gender); 158 chrome.test.assertEq('female', voices[1].gender);
158 159
159 chrome.test.assertEq('Pat', voices[2].voiceName); 160 chrome.test.assertEq('Pat', voices[2].voiceName);
160 chrome.test.assertEq('en-US', voices[2].lang); 161 chrome.test.assertEq('en-US', voices[2].lang);
161 chrome.test.succeed(); 162 chrome.test.succeed();
162 }); 163 });
163 } 164 }
164 ]); 165 ]);
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698