Bug 513146. Since this test assumes things about the positioning of things on the page but doesn't flush layout before running, we need to make sure to either run it when pageload is done or make it flush layout up front. Do the former. Will get gavin's review.
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 19 Feb 2010 23:04:09 -0500
changeset 38321 1d2b78587a8a43f9dbe3477b28bab72452d65e05
parent 38320 092ee825f583c05d514e5f91e46a67ff761e3ce9
child 38322 0264f8178ac9f123939065abd10a2d1a6ad554d0
push id11694
push userbzbarsky@mozilla.com
push dateSat, 20 Feb 2010 04:04:25 +0000
treeherdermozilla-central@1d2b78587a8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs513146
milestone1.9.3a2pre
Bug 513146. Since this test assumes things about the positioning of things on the page but doesn't flush layout before running, we need to make sure to either run it when pageload is done or make it flush layout up front. Do the former. Will get gavin's review.
dom/tests/mochitest/general/test_domWindowUtils.html
--- a/dom/tests/mochitest/general/test_domWindowUtils.html
+++ b/dom/tests/mochitest/general/test_domWindowUtils.html
@@ -83,18 +83,21 @@ function testElementFromPoint() {
       let [moveX, moveY] = moveData[0];
 
       moveEl.style.left = moveX + "px";
       moveEl.style.top = moveY + "px";
     }
     let found = domWindowUtils.elementFromPoint(x, y, ignoreScroll, flushLayout);
     is(found, expected, "at index " + i + " for data " + testData[i][0].toSource());
   }
+
+  SimpleTest.finish();
 }
 
-testElementFromPoint();
+SimpleTest.waitForExplicitFinish();
+addLoadEvent(testElementFromPoint);
 
 </script>
 
 <p id="display"></p>
 
 </body>
 </html>