|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=384014 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 384014</title> |
|
8 <script type="text/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=384014">Mozilla Bug 384014</a> |
|
13 <p id="display"> |
|
14 <iframe id="f" src="javascript:try { window.x = 'PASS'; s = 'PASS' } catch(e) { s = 'FAIL' } s;"></iframe> |
|
15 </p> |
|
16 <div id="content" style="display: none"> |
|
17 |
|
18 </div> |
|
19 <pre id="test"> |
|
20 <script class="testbody" type="text/javascript"> |
|
21 |
|
22 /** Test for Bug 384014 **/ |
|
23 SimpleTest.waitForExplicitFinish(); |
|
24 |
|
25 function runTest() { |
|
26 $("f").onload = function () { |
|
27 is($("f").contentDocument.documentElement.textContent, "PASS", |
|
28 "We fail"); |
|
29 SimpleTest.finish(); |
|
30 } |
|
31 |
|
32 $("f").contentWindow.location.reload(); |
|
33 } |
|
34 |
|
35 addLoadEvent(runTest); |
|
36 |
|
37 </script> |
|
38 </pre> |
|
39 </body> |
|
40 </html> |
|
41 |