Index: chrome/test/data/extensions/api_test/webrtc_from_web_accessible_resource/iframe.js |
diff --git a/chrome/test/data/extensions/api_test/webrtc_from_web_accessible_resource/iframe.js b/chrome/test/data/extensions/api_test/webrtc_from_web_accessible_resource/iframe.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0473b746b4cf6f0020450207a87d46bb69ac1a20 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/webrtc_from_web_accessible_resource/iframe.js |
@@ -0,0 +1,22 @@ |
+// Copyright 2015 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. |
+ |
+var extensionId = "knldjmfmopnpolahpmmgbagdohdnhkik"; |
robwu
2015/10/14 09:05:35
extensionId seems unused.
jww
2015/10/15 18:19:41
Done.
|
+ |
+var successCallback = chrome.test.succeed; |
+var failCallback = chrome.test.fail; |
+ |
+console.log('location.search == ' + document.location.search); |
+if (document.location.search === '?fail') { |
+ console.log('failing...'); |
robwu
2015/10/14 09:05:35
Could you reword this to be a more descriptive? (2
jww
2015/10/15 18:19:41
Instead, I'll just remove all of these unnecessary
|
+ successCallback = chrome.test.fail; |
robwu
2015/10/14 09:05:35
Note that the success callback of gUM is invoked w
jww
2015/10/15 18:19:41
Done.
|
+ failCallback = chrome.test.succeed; |
+} else { |
+ console.log('succeeding...'); |
+} |
+ |
+navigator.webkitGetUserMedia({ |
+ audio: true, |
+ video: false |
+}, successCallback, failCallback); |