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

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
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..9f3aa49245b3fcd343d6de4b46e3befe3b6b3154
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/tts/pause_resume/test.js
@@ -0,0 +1,33 @@
+// 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',
+ {
+ '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();
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698