Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5315)

Unified Diff: chrome/test/data/extensions/api_test/tts/pause_resume/test.js

Issue 15108002: Add Pause and Resume to Web TTS & Extension TTS APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/tts/pause_resume/test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
+]);
« no previous file with comments | « chrome/test/data/extensions/api_test/tts/pause_resume/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698