modules/libjar/test/mochitest/test_bug403331.html
author Benjamin Smedberg <benjamin@smedbergs.us>
Tue, 12 Jan 2010 16:53:10 -0500
changeset 37206 e828ac5006650b19def0b3b35cca72b80ef46548
parent 28048 8f7b73d88f6bbedec99c6c8ef48b243ab922d05c
child 39054 b4372055f473cb39d74dbe97e0206dd61ccc2547
permissions -rw-r--r--
Bug 539290 - Test harness should look for minidumps from child (plugin) processes but not turn the tree orange automatically, r=ted

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=403331
-->
<head>
  <title>Test for Bug 403331</title>
  <script type="text/javascript" src="/MochiKit/packed.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>

<iframe id="testFrame"></iframe>

<pre id="test">
<script class="testbody" type="text/javascript">

/** Test for Bug 403331 **/

SimpleTest.waitForExplicitFinish();

function runTest() {
  var testFrame = document.getElementById('testFrame');

  // Try a redirected load from another domain to this one.

  testFrame.onload = function() {
    // If properly redirected, we'll be able to access elements in the loaded
    // document.
    var item = testFrame.contentDocument.getElementById('testitem');
    is(item.textContent, "testcontents", "Should be able to access the child document");

    SimpleTest.finish();
  }

  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";
}

addLoadEvent(runTest);

</script>
</pre>

</body>
</html>