1 // Copyright (c) 2012 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 engine api test. This test doesn't actually exercise the API at all,
6 // it just makes sure that the ttsEngine permission is sufficient to make use
8 // browser_tests.exe --gtest_filter="TtsApiTest.*"
10 chrome.test.runTests([
11 function testTtsEngineApiSucceeds() {
12 var speakListener = function(utterance, options, sendTtsEvent) {
13 sendTtsEvent({'type': 'end'});
15 var stopListener = function() {};
17 // This regressed after a recent refactoring because the internal
18 // bindings for chrome.ttsEngine.onSpeak.addListener reference
19 // chrome.tts.onEvent, which wasn't included by the ttsEngine permission.
20 chrome.ttsEngine.onSpeak.addListener(speakListener);
21 chrome.ttsEngine.onStop.addListener(stopListener);
22 chrome.test.assertNoLastError();
23 chrome.test.succeed();