Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / modules / libjar / test / mochitest / test_bug403331.html
blob02065221118cbd9dece15ded2e29b742bef5e6d2
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=403331
5 -->
6 <head>
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" />
11 </head>
12 <body>
14 <iframe id="testFrame"></iframe>
16 <pre id="test">
17 <script class="testbody" type="text/javascript">
19 /** Test for Bug 403331 **/
21 SimpleTest.waitForExplicitFinish();
23 function runTest() {
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
30 // document.
31 var item = testFrame.contentDocument.getElementById('testitem');
32 is(item.textContent, "testcontents", "Should be able to access the child document");
34 SimpleTest.finish();
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);
42 </script>
43 </pre>
45 </body>
46 </html>