4 https://bugzilla.mozilla.org/show_bug.cgi?id=403331
7 <title>Test for Bug
403331</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
14 <iframe id=
"testFrame"></iframe>
17 <script class=
"testbody" type=
"text/javascript">
19 /** Test for Bug
403331 **/
21 SimpleTest.waitForExplicitFinish();
24 var testFrame = document.getElementById('testFrame');
26 // Try a redirected load from another domain to this one.
28 testFrame.onload = function() {
29 // If properly redirected, we'll be able to access elements in the loaded
31 var item = testFrame.contentDocument.getElementById('testitem');
32 is(item.textContent,
"testcontents",
"Should be able to access the child document");
37 testFrame.src =
"jar:http://example.org:80/tests/modules/libjar/test/mochitest/openredirect.sjs?http://localhost:8888/tests/modules/libjar/test/mochitest/bug403331.zip!/test.html";
40 addLoadEvent(runTest);