OLD | NEW |
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 // browser_tests.exe --gtest_filter="TtsApiTest.*" | 5 // browser_tests.exe --gtest_filter="TtsApiTest.*" |
6 | 6 |
7 chrome.test.runTests([ | 7 chrome.test.runTests([ |
8 function testSpeakOnce() { | 8 function testSpeakOnce() { |
9 function eventListener(event) { | 9 function eventListener(event) { |
10 chrome.test.assertEq('end', event.type); | 10 chrome.test.assertEq('end', event.type); |
11 chrome.test.assertEq(11, event.charIndex); | 11 chrome.test.assertEq(11, event.charIndex); |
12 chrome.test.succeed(); | 12 chrome.test.succeed(); |
13 } | 13 } |
14 chrome.experimental.tts.speak( | 14 chrome.experimental.tts.speak( |
15 'hello world', | 15 'hello world', |
16 {'onevent': eventListener}, | 16 {'onEvent': eventListener}, |
17 function() { | 17 function() { |
18 chrome.test.assertNoLastError(); | 18 chrome.test.assertNoLastError(); |
19 }); | 19 }); |
20 } | 20 } |
21 ]); | 21 ]); |
OLD | NEW |