blob: a903ab36402080457dd57afd4fdd21412979cea4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TTS api test for Chrome on ChromeOS.
// browser_tests.exe --gtest_filter="TtsApiTest.*"
chrome.test.runTests([
function testAllSpeakCallbackFunctionsAreCalled() {
var callbacks = 0;
chrome.experimental.tts.speak('text 1', {'enqueue': true}, function() {
chrome.test.assertNoLastError();
callbacks++;
});
chrome.experimental.tts.speak('text 2', {'enqueue': true}, function() {
chrome.test.assertNoLastError();
callbacks++;
if (callbacks == 2) {
chrome.test.succeed();
} else {
chrome.test.fail();
}
});
}
]);
|