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

Side by Side Diff: chrome/test/data/extensions/api_test/tts/chromeos/test.js

Issue 7282048: Update TTS extension API docs to reflect latest changes. Note that this (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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="ExtensionApiTest.TtsChromeOs" 6 // browser_tests.exe --gtest_filter="ExtensionApiTest.TtsChromeOs"
7 7
8 chrome.test.runTests([ 8 chrome.test.runTests([
9 function testChromeOsSpeech() { 9 function testChromeOsSpeech() {
10 var callbacks = 0; 10 var callbacks = 0;
11 chrome.experimental.tts.speak( 11 chrome.experimental.tts.speak(
12 'text 1', 12 'text 1',
13 { 13 {
14 'onevent': function(event) { 14 'onEvent': function(event) {
15 callbacks++; 15 callbacks++;
16 chrome.test.assertEq('interrupted', event.type); 16 chrome.test.assertEq('interrupted', event.type);
17 } 17 }
18 }, 18 },
19 function() { 19 function() {
20 chrome.test.assertNoLastError(); 20 chrome.test.assertNoLastError();
21 }); 21 });
22 chrome.experimental.tts.speak( 22 chrome.experimental.tts.speak(
23 'text 2', 23 'text 2',
24 { 24 {
25 'onevent': function(event) { 25 'onEvent': function(event) {
26 chrome.test.assertEq('end', event.type); 26 chrome.test.assertEq('end', event.type);
27 callbacks++; 27 callbacks++;
28 if (callbacks == 2) { 28 if (callbacks == 2) {
29 chrome.test.succeed(); 29 chrome.test.succeed();
30 } else { 30 } else {
31 chrome.test.fail(); 31 chrome.test.fail();
32 } 32 }
33 } 33 }
34 }, 34 },
35 function() { 35 function() {
36 chrome.test.assertNoLastError(); 36 chrome.test.assertNoLastError();
37 }); 37 });
38 } 38 }
39 39
40 ]); 40 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extension_process_bindings.js ('k') | chrome/test/data/extensions/api_test/tts/enqueue/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698