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

Unified Diff: chrome/test/data/extensions/platform_apps/speech/background_page/test.js

Issue 24292004: Allow webkitSpeechRecognition work from an app's background page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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/platform_apps/speech/background_page/test.js
diff --git a/chrome/test/data/extensions/platform_apps/speech/background_page/test.js b/chrome/test/data/extensions/platform_apps/speech/background_page/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..fb2407c1b4e685e9fea5c21d30987544304b63a1
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/speech/background_page/test.js
@@ -0,0 +1,24 @@
+// Copyright 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.
+
+chrome.app.runtime.onLaunched.addListener(function() {
+ chrome.test.runTests([
+ function testWebkitSpeechRecognition() {
+ var succeeded = false;
+
+ var r = new webkitSpeechRecognition();
+ r.onerror = function(e) {
+ if (succeeded) {
+ return;
+ }
not at google - send to devlin 2013/09/20 22:36:46 when does it get onerror?
lazyboy 2013/09/20 22:49:08 When "audioCapture" permission is missing from the
not at google - send to devlin 2013/09/20 23:03:41 Ok. The manifest.json here has "audioCapture" thou
lazyboy 2013/09/21 00:48:04 Added separate test w/o permission.
+ chrome.test.fail();
+ };
+ r.onstart = function() {
+ succeeded = true;
+ chrome.test.succeed();
+ };
+ r.start();
+ }
+ ]);
+});

Powered by Google App Engine
This is Rietveld 408576698