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
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 19 Nov 2010 22:12:09 -0800
changeset 57976 179c84928c644c2d0368f915ec7bc99425b4d081
parent 57975 1002f2452919e20ee18bd24ce777d9f9e483f710
child 57977 8a5f16022cbd88de7b4a5e25463c749882323310
push idunknown
push userunknown
push dateunknown
reviewersmrbkap, test
bugs601536
milestone2.0b8pre
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
dom/tests/mochitest/dom-level0/test_location.html
--- 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>