|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=946815 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 946815</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 <script type="application/javascript"> |
|
12 |
|
13 SimpleTest.waitForExplicitFinish(); |
|
14 |
|
15 function setup() { |
|
16 // The idea of this test is to test the visibility of window.MozWifiP2pManager |
|
17 // which requires 'wifi-manage' permission on content/XBL respectively. |
|
18 // We start from no 'wifi-manage' permission, so window.MozWifiP2pManager |
|
19 // is supposed to not be seen on both content and XBL scope. Then we add |
|
20 // the permission back and we should see window.MozWifiP2pManager on content |
|
21 // and XBL scope. |
|
22 SpecialPowers.pushPermissions([{ "type": "wifi-manage", "allow": 0, "context": window.document }], function() { |
|
23 $('ifr').setAttribute('src', 'file_bug946815.xhtml'); |
|
24 }); |
|
25 } |
|
26 |
|
27 </script> |
|
28 </head> |
|
29 <body onload="setup();"> |
|
30 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=946815">Mozilla Bug 946815</a> |
|
31 <p id="display"></p> |
|
32 <div id="content"> |
|
33 <iframe id="ifr"></iframe> |
|
34 </div> |
|
35 <pre id="test"> |
|
36 </pre> |
|
37 </body> |
|
38 </html> |