Index: chrome/test/data/extensions/platform_apps/speech/background_page_no_permission/test.js |
diff --git a/chrome/test/data/extensions/platform_apps/speech/background_page_no_permission/test.js b/chrome/test/data/extensions/platform_apps/speech/background_page_no_permission/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3a52a25fadfd7b191662ef5a5aae1128259a9382 |
--- /dev/null |
+++ b/chrome/test/data/extensions/platform_apps/speech/background_page_no_permission/test.js |
@@ -0,0 +1,19 @@ |
+// 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 r = new webkitSpeechRecognition(); |
+ r.onerror = function(e) { // Expect to fail. |
+ chrome.test.assertEq('not-allowed', e.error); |
+ chrome.test.succeed(); |
+ }; |
+ r.onstart = function() { |
+ chrome.test.fail(); |
+ }; |
+ r.start(); |
+ } |
+ ]); |
+}); |