Skip to content

Commit

Permalink
Bug 453969 - Fix the race in test_bug382113.html so we don't set our …
Browse files Browse the repository at this point in the history
…child-onload-fired boolean to false _after_ the child onload has already fired. r=froydnj, a=test-only
  • Loading branch information
bzbarsky committed Mar 10, 2015
1 parent 1b97832 commit 71996a5
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions content/base/test/test_bug382113.html
Expand Up @@ -7,6 +7,19 @@
<title>Test for Bug 382113</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script class="testbody" type="application/javascript">

SimpleTest.waitForExplicitFinish();
var childGotOnload = false;
var objectGotOnload = false;

/** Test for Bug 100533 **/
function checkEvents() {
is(childGotOnload, true, "Child got load event");
is(objectGotOnload, true, "Object got load event");
SimpleTest.finish();
}
</script>
</head>
<body onload="checkEvents()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=382113">Mozilla Bug 382113</a>
Expand All @@ -16,22 +29,6 @@
onload="objectGotOnload = true;"></object>
</div>
<pre id="test">


<script class="testbody" type="application/javascript">

SimpleTest.waitForExplicitFinish();
var childGotOnload = false;
var objectGotOnload = false;

/** Test for Bug 100533 **/
function checkEvents() {
is(childGotOnload, true, "Child got load event");
is(objectGotOnload, true, "Object got load event");
SimpleTest.finish();
}
</script>

</pre>
</body>
</html>
Expand Down

0 comments on commit 71996a5

Please sign in to comment.