summaryrefslogtreecommitdiffstats
path: root/b2g/components/test/mochitest/SandboxPromptTest.html
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:25:10 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:25:10 -0500
commit8b8c65072aedef94610748ce92c2ed3a19fd5517 (patch)
tree8614d386acf5db7a77b08d19a5854a7d75dab015 /b2g/components/test/mochitest/SandboxPromptTest.html
parent8c3a46bd13a0660a3ff1e0379dbf515873a852d2 (diff)
downloadUXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.gz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.lz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.xz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.zip
Purge b2g/
Diffstat (limited to 'b2g/components/test/mochitest/SandboxPromptTest.html')
-rw-r--r--b2g/components/test/mochitest/SandboxPromptTest.html57
1 files changed, 0 insertions, 57 deletions
diff --git a/b2g/components/test/mochitest/SandboxPromptTest.html b/b2g/components/test/mochitest/SandboxPromptTest.html
deleted file mode 100644
index 54f5fdd48..000000000
--- a/b2g/components/test/mochitest/SandboxPromptTest.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<body>
-<script>
-
-var actions = [
- {
- permissions: ["video-capture"],
- action: function() {
- // invoke video-capture permission prompt
- navigator.mozGetUserMedia({video: true}, function () {}, function () {});
- }
- },
- {
- permissions: ["audio-capture", "video-capture"],
- action: function() {
- // invoke audio-capture + video-capture permission prompt
- navigator.mozGetUserMedia({audio: true, video: true}, function () {}, function () {});
- }
- },
- {
- permissions: ["audio-capture"],
- action: function() {
- // invoke audio-capture permission prompt
- navigator.mozGetUserMedia({audio: true}, function () {}, function () {});
- }
- },
- {
- permissions: ["geolocation"],
- action: function() {
- // invoke geolocation permission prompt
- navigator.geolocation.getCurrentPosition(function (pos) {});
- }
- },
- {
- permissions: ["desktop-notification"],
- action: function() {
- // invoke desktop-notification prompt
- Notification.requestPermission(function (perm) {});
- }
- },
-];
-
-// The requested permissions are specified in query string.
-var permissions = JSON.parse(decodeURIComponent(window.location.search.substring(1)));
-for (var i = 0; i < actions.length; i++) {
- if(permissions.length === actions[i].permissions.length &&
- permissions.every(function(permission) {
- return actions[i].permissions.indexOf(permission) >= 0;
- })) {
- actions[i].action();
- break;
- }
-}
-
-</script>
-</body>
-</html>