modules/libjar/test/mochitest/test_bug403331.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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="/tests/SimpleTest/SimpleTest.js"></script>        
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 </head>
    11 <body>
    13 <iframe id="testFrame"></iframe>
    15 <pre id="test">
    16 <script class="testbody" type="text/javascript">
    18 /** Test for Bug 403331 **/
    20 SimpleTest.waitForExplicitFinish();
    22 function runTest() {
    23   var testFrame = document.getElementById('testFrame');
    25   // Try a redirected load from another domain to this one.
    27   testFrame.onload = function() {
    28     // If properly redirected, we'll be able to access elements in the loaded
    29     // document.
    30     var item = testFrame.contentDocument.getElementById('testitem');
    31     is(item.textContent, "testcontents", "Should be able to access the child document");
    33     SimpleTest.finish();
    34   }
    36   testFrame.src = "jar:http://example.org:80/tests/modules/libjar/test/mochitest/openredirect.sjs?http://mochi.test:8888/tests/modules/libjar/test/mochitest/bug403331.zip!/test.html";
    37 }
    39 addLoadEvent(runTest);
    41 </script>
    42 </pre>
    44 </body>
    45 </html>

mercurial