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(); |
+ } |
+ ]); |
+}); |