Bug 625562 - Fix intermittent frameLoaded is not defined by moving the iframes below the definition of frameLoaded, r=jwatt, a=orange
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 17 Jan 2011 22:26:32 -0800
changeset 61579 8e94c9b9d497f5495fcc8ab86c793691f7560db4
parent 61578 bfd144a54f0adcb1f01995403f16bdf8d33ab0e1
child 61580 ac74d4c7d72b16a86be3f5cc752d36c613f5a290
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersjwatt, orange
bugs625562
milestone2.0b11pre
Bug 625562 - Fix intermittent frameLoaded is not defined by moving the iframes below the definition of frameLoaded, r=jwatt, a=orange
content/svg/content/test/test_a_href_01.xhtml
--- a/content/svg/content/test/test_a_href_01.xhtml
+++ b/content/svg/content/test/test_a_href_01.xhtml
@@ -6,22 +6,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test that activating SVG 'a' elements navigate to their xlink:href</title>
   <script type="text/javascript" src="/MochiKit/packed.js"></script>
   <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=620295">Mozilla Bug 620295</a>
 <p id="display"></p>
-<div id="content" style="visibility: hidden">
-<iframe id="iframe1" src="a_href_helper_01.svg" onload="frameLoaded()"></iframe>
-<iframe id="iframe2" src="a_href_helper_02_03.svg" onload="frameLoaded()"></iframe>
-<iframe id="iframe3" src="a_href_helper_02_03.svg" onload="frameLoaded()"></iframe>
-<iframe id="iframe4" src="a_href_helper_04.svg" onload="frameLoaded()"></iframe>
-</div>
 <pre id="test">
 <script class="testbody" type="text/javascript"><![CDATA[
 
 SimpleTest.waitForExplicitFinish();
 
 var testCount = 4;
 var didWindowLoad = false;
 var frameLoadCount = 0;
@@ -83,10 +77,17 @@ function dispatchClickEvent(element) {
                        false, false, 0, null);
   element.dispatchEvent(event);
 }
 
 window.onload = windowLoaded;
 
 ]]></script>
 </pre>
+<div id="content" style="visibility: hidden">
+<!-- These must come after frameLoaded is defined -->
+<iframe id="iframe1" src="a_href_helper_01.svg" onload="frameLoaded()"></iframe>
+<iframe id="iframe2" src="a_href_helper_02_03.svg" onload="frameLoaded()"></iframe>
+<iframe id="iframe3" src="a_href_helper_02_03.svg" onload="frameLoaded()"></iframe>
+<iframe id="iframe4" src="a_href_helper_04.svg" onload="frameLoaded()"></iframe>
+</div>
 </body>
 </html>