Bug 539356 - Fix selectAtPoint.html test. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 28 Sep 2012 01:07:40 +1200
changeset 108296 66f6deffdc70c9f8a9d129d2cbfc113c82bbdb1c
parent 108295 cbcc52822df2df1164a1ddd457f7d4b4a7748d9f
child 108297 920cf04e0fe08b8cd6188c45d2b8016e2fa9b495
push id23552
push userryanvm@gmail.com
push dateFri, 28 Sep 2012 03:05:08 +0000
treeherdermozilla-central@2d96ee8d9dd4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs539356
milestone18.0a1
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 539356 - Fix selectAtPoint.html test. r=mattwoodrow
dom/tests/mochitest/chrome/selectAtPoint.html
--- a/dom/tests/mochitest/chrome/selectAtPoint.html
+++ b/dom/tests/mochitest/chrome/selectAtPoint.html
@@ -192,23 +192,33 @@
   let pageLoad = false;
   let painted = false;
   function testReady() {
     if (frameLoad && pageLoad && painted) 
       doTest();
   }
 
   function onFrameLoad() {
-    frameLoad = true;
-    testReady();
+    // Exit the onload handler before trying the test, because we need
+    // to ensure that paint unsupression has happened.
+    setTimeout(function() {
+      frameLoad = true;
+      testReady();
+    }, 0);
   }
 
   function onPageLoad() {
-    pageLoad = true;
-    testReady();
+    // Exit the onload handler before trying the test, because we need
+    // to ensure that paint unsupression has happened
+    // XXXroc why do we need to separately test for the loading of the frame
+    // and a paint? That should not be necessary for this test.
+    setTimeout(function() {
+      pageLoad = true;
+      testReady();
+    }, 0);
   }
 
   function onPaint() {
     window.removeEventListener("MozAfterPaint", onPaint, false);
     painted = true;
     testReady();
   }