OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 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 // TTS api test for Chrome. This is currently limited to ChromeOS. | |
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Tts | |
7 | |
8 chrome.test.runTests([ | |
9 function testSpeak() { | |
10 chrome.experimental.tts.speak('hello world', {}, function() { | |
11 chrome.test.succeed(); | |
12 }); | |
13 }, | |
14 | |
15 function testStop() { | |
16 chrome.experimental.tts.stop(); | |
17 chrome.test.succeed(); | |
18 }, | |
19 | |
20 function testIsSpeaking() { | |
21 for (var i = 0; i < 3; i++) { | |
22 chrome.experimental.tts.isSpeaking(function(speaking) { | |
23 chrome.test.assertTrue(speaking); | |
24 }); | |
25 } | |
26 chrome.experimental.tts.isSpeaking(function(speaking) { | |
27 chrome.test.assertFalse(speaking); | |
28 chrome.test.succeed(); | |
29 }); | |
30 } | |
31 ]); | |
OLD | NEW |