- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / tts / speak_once / test.js
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.
4
5 // browser_tests.exe --gtest_filter="TtsApiTest.*"
6
7 chrome.test.runTests([
8   function testSpeakOnce() {
9     function eventListener(event) {
10       chrome.test.assertEq('end', event.type);
11       chrome.test.assertEq(11, event.charIndex);
12       chrome.test.succeed();
13     }
14     chrome.tts.speak(
15         'hello world',
16         {'onEvent': eventListener},
17         function() {
18           chrome.test.assertNoLastError();
19         });
20   }
21 ]);