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
3 // found in the LICENSE file.
5 // TTS api test for Chrome on ChromeOS.
6 // browser_tests.exe --gtest_filter="TtsApiTest.*"
9 function testQueueInterrupt() {
10 // In this test, two utterances are queued, and then a third
11 // interrupts. The first gets interrupted, the second never gets spoken
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.
19 'onEvent': function(event) {
20 chrome.test.assertEq('interrupted', event.type);
25 chrome.test.assertNoLastError();
32 'onEvent': function(event) {
33 chrome.test.assertEq('cancelled', event.type);
37 chrome.test.assertNoLastError();
44 'onEvent': function(event) {
45 chrome.test.assertEq('end', event.type);
48 chrome.test.succeed();
55 chrome.test.assertNoLastError();