Bug 601536 - get rid of intermittent "runTest is not defined" errors by moving the iframe down below the script that its onload calls into, r=mrbkap, a=test
--- a/dom/tests/mochitest/dom-level0/test_location.html
+++ b/dom/tests/mochitest/dom-level0/test_location.html
@@ -6,17 +6,16 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
-<iframe id="ifr" onload="runTest()"></iframe>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
var count = 0;
var firstlocation;
var lastlocation;
@@ -65,10 +64,11 @@ function runTest() {
ok(lastlocation !== $('ifr').contentWindow.location, 'location objects are distinct');
ok(firstlocation.href.indexOf('file_location.html'), 'can read location.href');
SimpleTest.finish();
}
</script>
</pre>
+<iframe id="ifr" onload="runTest()"></iframe>
</body>
</html>