|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=92773 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 92773</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=92773">Mozilla Bug 92773</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 |
|
16 </div> |
|
17 |
|
18 <pre id="test"> |
|
19 <script type="application/javascript"> |
|
20 |
|
21 /** Test for Bug 92773 **/ |
|
22 function go() { |
|
23 try { |
|
24 $('ifr').contentWindow.foo; |
|
25 ok(false, "able to access cross-origin getter"); |
|
26 } catch (e) { |
|
27 ok(/Permission denied/.exec(e), "unable to access cross-origin getter"); |
|
28 } |
|
29 |
|
30 SimpleTest.finish(); |
|
31 } |
|
32 SimpleTest.waitForExplicitFinish(); |
|
33 |
|
34 </script> |
|
35 </pre> |
|
36 |
|
37 <iframe id='ifr' |
|
38 src='http://example.com/tests/js/xpconnect/tests/mochitest/bug92773_helper.html' |
|
39 onload="go()"> |
|
40 </iframe> |
|
41 |
|
42 </body> |
|
43 </html> |