gecko-dev/dom/xbl/test/test_bug946815.html
2014-03-04 16:31:49 +08:00

39 lines
1.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=946815
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 946815</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
function setup() {
// The idea of this test is to test the visibility of window.MozWifiP2pManager
// which requires 'wifi-manage' permission on content/XBL respectively.
// We start from no 'wifi-manage' permission, so window.MozWifiP2pManager
// is supposed to not be seen on both content and XBL scope. Then we add
// the permission back and we should see window.MozWifiP2pManager on content
// and XBL scope.
SpecialPowers.pushPermissions([{ "type": "wifi-manage", "allow": 0, "context": window.document }], function() {
$('ifr').setAttribute('src', 'file_bug946815.xhtml');
});
}
</script>
</head>
<body onload="setup();">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=946815">Mozilla Bug 946815</a>
<p id="display"></p>
<div id="content">
<iframe id="ifr"></iframe>
</div>
<pre id="test">
</pre>
</body>
</html>