Index: chrome/test/data/extensions/api_test/tts/pause_resume/test.js |
diff --git a/chrome/test/data/extensions/api_test/tts/pause_resume/test.js b/chrome/test/data/extensions/api_test/tts/pause_resume/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..38323899d4f57553c0dfb7ba3eb686f8bad1d2bf |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/tts/pause_resume/test.js |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2013 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 |
+// browser_tests.exe --gtest_filter="TtsApiTest.*" |
+ |
+chrome.test.runTests([ |
+ function testPauseBeforeSpeak() { |
+ chrome.tts.pause(); |
+ chrome.tts.speak( |
+ 'test 1', |
+ { |
+ 'enqueue': true, |
+ 'onEvent': function(event) { |
+ if (event.type == 'end') |
+ chrome.test.succeed(); |
+ } |
+ }); |
+ chrome.tts.resume(); |
+ }, |
+ function testPauseDuringSpeak() { |
+ chrome.tts.speak( |
+ 'test 2', |
+ { |
+ 'onEvent': function(event) { |
+ if (event.type == 'end') |
+ chrome.test.succeed(); |
+ } |
+ }); |
+ chrome.tts.pause(); |
+ chrome.tts.resume(); |
+ } |
+]); |