Bug 513146 - mochitest-plain: test_domWindowUtils.html fails intermittently; (Cv1) Merged branch patch.
authorSerge Gautherie <sgautherie.bz@free.fr>
Sat, 27 Feb 2010 13:34:20 +0100
changeset 33628 6315d8b83a549b8d578b751e5bf8908c1f28c08e
parent 33627 ff7fcef1c23e84cb4d3fac12f13d13ef83be29a3
child 33629 08f2d33c06f6d8c86795a231ecb625dff6d904da
push id1088
push usersgautherie.bz@free.fr
push dateSat, 27 Feb 2010 12:35:13 +0000
bugs513146
milestone1.9.2.2pre
Bug 513146 - mochitest-plain: test_domWindowUtils.html fails intermittently; (Cv1) Merged branch patch. r=gavin.sharp.
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,23 @@ 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();
+// Run the test from onload, since the onscreen and offscreen divs should be in
+// the right places by then.
+SimpleTest.waitForExplicitFinish();
+addLoadEvent(testElementFromPoint);
 
 </script>
 
 <p id="display"></p>
 
 </body>
 </html>