docshell/test/test_bug384014.html
author Jon Coppeard <jcoppeard@mozilla.com>
Wed, 22 Aug 2018 14:54:17 +0100
changeset 432835 3f1d6721cab0d1668a2441f7b0b7d018f1ac6475
parent 74314 95496a360748609134a5c666d57c7f48aa23393e
child 439146 58adc643dcdc20eccb4d30bc454b50420e96c020
permissions -rw-r--r--
Bug 1469599 - Associate all module scripts in a module graph with DOM elements before execution r=hsivonen

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=384014
-->
<head>
  <title>Test for Bug 384014</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=384014">Mozilla Bug 384014</a>
<p id="display">
<iframe id="f" src="javascript:try { window.x = 'PASS'; s = 'PASS' } catch(e) { s = 'FAIL' } s;"></iframe>
</p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

/** Test for Bug 384014 **/
SimpleTest.waitForExplicitFinish();

function runTest() {
  $("f").onload = function () {
    is($("f").contentDocument.documentElement.textContent, "PASS",
      "We fail");
    SimpleTest.finish();
  }

  $("f").contentWindow.location.reload();
}

addLoadEvent(runTest);

</script>
</pre>
</body>
</html>