Bug 568120 - Possible intermittent oranges in tests with iframe onload handlers pointing to functions defined later; r=sicking
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 25 May 2010 20:33:17 -0400
changeset 42899 3523f41cd62c8da5acecbbd02d334f235c3aa4a4
parent 42898 5d48e78f6ffaf9d3335e7e60ed8fd18bb791fed2
child 42900 0d19ecf59e1f1699585df9a9f46da23b26660430
push idunknown
push userunknown
push dateunknown
reviewerssicking
bugs568120
milestone1.9.3a5pre
Bug 568120 - Possible intermittent oranges in tests with iframe onload handlers pointing to functions defined later; r=sicking
content/html/content/test/test_bug546995-4.html
security/manager/ssl/tests/mochitest/bugs/test_bug413909.html
security/manager/ssl/tests/mochitest/bugs/test_bug480509.html
security/manager/ssl/tests/mochitest/bugs/test_bug484111.html
--- a/content/html/content/test/test_bug546995-4.html
+++ b/content/html/content/test/test_bug546995-4.html
@@ -7,17 +7,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 546995</title>
   <script type="application/javascript" src="/MochiKit/packed.js"></script>
   <script type="application/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=546995">Mozilla Bug 546995</a>
 <p id="display"></p>
-<iframe id="iframe" onload='onFrameLoad();'></iframe>
 <div id='content'>
 </div>
 <pre id="test">
 <script type="application/javascript;version=1.8">
 
 /** Test for Bug 546995 **/
 
 SimpleTest.waitForExplicitFinish();
@@ -43,10 +42,11 @@ function runTests()
   is(document.activeElement, document.getElementById('iframe'),
      "The iframe should have the focus");
 
   SimpleTest.finish();
 }
 
 </script>
 </pre>
+<iframe id="iframe" onload='onFrameLoad();'></iframe>
 </body>
 </html>
--- a/security/manager/ssl/tests/mochitest/bugs/test_bug413909.html
+++ b/security/manager/ssl/tests/mochitest/bugs/test_bug413909.html
@@ -3,18 +3,16 @@
 <head>
   <title>Test bug 413909</title>
   <script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>        
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body onload="onWindowLoad()">
 
-<iframe name="frame1" src="https://bug413909.xn--hxajbheg2az3al.xn--jxalpdlp/" onload="onFrameLoad()"></iframe>
-
 <script class="testbody" type="text/javascript">
 
 var certOverrideService = Components.classes["@mozilla.org/security/certoverride;1"]
   .getService(Components.interfaces.nsICertOverrideService);
 var cert = null;
 var certListener = null;
 var frameLoadTimeout = null;
 
@@ -130,10 +128,11 @@ function onWindowLoad()
     ok(false, "Secure page did not load, adding exception failed?");
     SimpleTest.finish();
   }, 5000);
 
   window.frame1.location.reload();
 }
 
 </script>
+<iframe name="frame1" src="https://bug413909.xn--hxajbheg2az3al.xn--jxalpdlp/" onload="onFrameLoad()"></iframe>
 </body>
 </html>
--- a/security/manager/ssl/tests/mochitest/bugs/test_bug480509.html
+++ b/security/manager/ssl/tests/mochitest/bugs/test_bug480509.html
@@ -2,18 +2,16 @@
 <head>
   <title>Test bug 483437 and bug 480509</title>
   <script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>        
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body onload="onWindowLoad()">
 
-<iframe src="https://www.bank1.com/" onload="onFrameLoad()"></iframe>
-
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 function badCertListener() 
 {
 }
 
@@ -79,10 +77,11 @@ function onWindowLoad()
   
   ok(certListener.badCertCaught, "We Caught the invalid certificate");
   
   SimpleTest.finish();
 }
 
 </script>
 
+<iframe src="https://www.bank1.com/" onload="onFrameLoad()"></iframe>
 </body>
 </html>
--- a/security/manager/ssl/tests/mochitest/bugs/test_bug484111.html
+++ b/security/manager/ssl/tests/mochitest/bugs/test_bug484111.html
@@ -2,18 +2,16 @@
 <head>
   <title>Test bug 484111</title>
   <script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>        
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body onload="onWindowLoad()">
 
-<iframe src="https://www.bank2.com/" onload="onFrameLoad()"></iframe>
-
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 function badCertListener() 
 {
 }
 
@@ -63,10 +61,11 @@ function onWindowLoad()
   
   ok(certListener.badCertCaught, "We Caught the invalid certificate");
   
   SimpleTest.finish();
 }
 
 </script>
 
+<iframe src="https://www.bank2.com/" onload="onFrameLoad()"></iframe>
 </body>
 </html>