diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
commit | 8b8c65072aedef94610748ce92c2ed3a19fd5517 (patch) | |
tree | 8614d386acf5db7a77b08d19a5854a7d75dab015 /b2g/components/test/mochitest/test_permission_visibilitychange.html | |
parent | 8c3a46bd13a0660a3ff1e0379dbf515873a852d2 (diff) | |
download | UXP-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/test_permission_visibilitychange.html')
-rw-r--r-- | b2g/components/test/mochitest/test_permission_visibilitychange.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/b2g/components/test/mochitest/test_permission_visibilitychange.html b/b2g/components/test/mochitest/test_permission_visibilitychange.html deleted file mode 100644 index cd5694b42..000000000 --- a/b2g/components/test/mochitest/test_permission_visibilitychange.html +++ /dev/null @@ -1,57 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=951997 ---> -<head> - <meta charset="utf-8"> - <title>Permission Prompt Test</title> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> - <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1020179">Permission prompt visibilitychange test</a> -<script type="application/javascript;version=1.8"> - -"use strict"; - -var gUrl = SimpleTest.getTestFileURL("permission_handler_chrome.js"); -var gScript = SpecialPowers.loadChromeScript(gUrl); - -function testDone() { - gScript.sendAsyncMessage("teardown", ""); - gScript.destroy(); - SimpleTest.finish(); - alert("setVisible::true"); -} - -function runTest() { - navigator.geolocation.getCurrentPosition( - function (pos) { - ok(false, "unexpected success, permission request should be canceled"); - testDone(); - }, function (err) { - ok(true, "success, permission request is canceled"); - testDone(); - }); -} - -gScript.addMessageListener("permission-request", function (detail) { - info("got permission-request!!!!\n"); - alert("setVisible::false"); -}); - -// Add permissions to this app. We use ALLOW_ACTION here. The ContentPermissionPrompt -// should prompt for permission, not allow it without prompt. -SpecialPowers.pushPrefEnv({"set": [["media.navigator.permission.disabled", false]]}, - function() { - SpecialPowers.addPermission("geolocation", - SpecialPowers.Ci.nsIPermissionManager.PROMPT_ACTION, document); - runTest(); - }); - -SimpleTest.waitForExplicitFinish(); -</script> -</pre> -</body> -</html> |