Bug 570980 - intermittent failure in test_fullpage.html | An error occurred - frameLoaded is not definedfixes race in plugin mochitest. r=bz
authorBenedict Hsieh <bhsieh@mozilla.com>
Fri, 11 Jun 2010 12:02:44 -0700
changeset 43514 5c8f2b1ad4e54f9f52c7bb03a89269f4408e6535
parent 43513 ee457bad4c8f2700b8faf501827030fad6622cfd
child 43515 4ec9565fd532018024f31638b44616ea5b8d2780
push id13747
push userdwitte@mozilla.com
push dateFri, 11 Jun 2010 19:02:55 +0000
treeherdermozilla-central@5c8f2b1ad4e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs570980
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 570980 - intermittent failure in test_fullpage.html | An error occurred - frameLoaded is not definedfixes race in plugin mochitest. r=bz
modules/plugin/test/mochitest/test_fullpage.html
--- a/modules/plugin/test/mochitest/test_fullpage.html
+++ b/modules/plugin/test/mochitest/test_fullpage.html
@@ -6,19 +6,16 @@
   <script type="text/javascript"
           src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css"
         href="/tests/SimpleTest/test.css">
 
 <body>
   <p id="display"></p>
 
-  <iframe src="loremipsum.xtest" streamtype="seek"></iframe>
-  <iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
-
   <script type="application/javascript">
     SimpleTest.waitForExplicitFinish();
 
     function frameLoaded() {
       var testframe = document.getElementById('testframe');
       var content = testframe.contentDocument.body.innerHTML;
       if (!content.length)
         return;
@@ -28,8 +25,11 @@
       req.overrideMimeType('text/plain; charset=x-user-defined');
       req.send(null);
       is(req.status, 200, "bad XMLHttpRequest");
       is(content, req.responseText.replace(/\r\n/g, "\n"),
          "content doesn't match");
       SimpleTest.finish();
     }
   </script>
+
+  <iframe src="loremipsum.xtest" streamtype="seek"></iframe>
+  <iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>