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

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

Issue 9808024: Move TTS extension API to chrome/browser/speech/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile error, rebase Created 8 years, 9 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
« no previous file with comments | « chrome/chrome_tests.gypi ('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 testQueueInterrupt() { 9 function testQueueInterrupt() {
10 // In this test, two utterances are queued, and then a third 10 // In this test, two utterances are queued, and then a third
11 // interrupts. The first gets interrupted, the second never gets spoken 11 // interrupts. The first gets interrupted, the second never gets spoken
12 // at all. The test expectations in extension_tts_apitest.cc ensure that 12 // at all. The test expectations in tts_extension_apitest.cc ensure that
13 // the first call to tts.speak keeps going until it's interrupted. 13 // the first call to tts.speak keeps going until it's interrupted.
14 var callbacks = 0; 14 var callbacks = 0;
15 chrome.tts.speak( 15 chrome.tts.speak(
16 'text 1', 16 'text 1',
17 { 17 {
18 'enqueue': true, 18 'enqueue': true,
19 'onEvent': function(event) { 19 'onEvent': function(event) {
20 chrome.test.assertEq('interrupted', event.type); 20 chrome.test.assertEq('interrupted', event.type);
21 callbacks++; 21 callbacks++;
22 } 22 }
(...skipping 27 matching lines...) Expand all
50 chrome.test.fail(); 50 chrome.test.fail();
51 } 51 }
52 } 52 }
53 }, 53 },
54 function() { 54 function() {
55 chrome.test.assertNoLastError(); 55 chrome.test.assertNoLastError();
56 callbacks++; 56 callbacks++;
57 }); 57 });
58 } 58 }
59 ]); 59 ]);
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698