Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / mochitest / test_bug92773.html
blobb1172f377ebd1663c897f28030e0a7709c6f286f
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 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">
16 </div>
18 <pre id="test">
19 <script type="application/javascript">
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");
30 SimpleTest.finish();
32 SimpleTest.waitForExplicitFinish();
34 </script>
35 </pre>
37 <iframe id='ifr'
38 src='http://example.com/tests/js/xpconnect/tests/mochitest/bug92773_helper.html'
39 onload="go()">
40 </iframe>
42 </body>
43 </html>