Bug 544537. Attempt to fix orange by making sure a paint has happened by adding a timeout. r=dbaron
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 05 Feb 2010 16:36:15 -0600
changeset 37931 d2687c5046e224145ea90de304622d861bf4b741
parent 37930 a4b5e469cf2ca56cf8cd3dee3fc6fdffa4f83cf3
child 37932 00c3090449fa49a26d6e1934153586f5e69b4dba
push id11506
push usertnikkel@gmail.com
push dateFri, 05 Feb 2010 22:31:39 +0000
treeherdermozilla-central@d2687c5046e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs544537
milestone1.9.3a2pre
Bug 544537. Attempt to fix orange by making sure a paint has happened by adding a timeout. r=dbaron
toolkit/content/tests/widgets/test_mousecapture_area.html
--- a/toolkit/content/tests/widgets/test_mousecapture_area.html
+++ b/toolkit/content/tests/widgets/test_mousecapture_area.html
@@ -63,17 +63,20 @@ function runTests()
   // Flush layout
   document.body.offsetWidth;
   // Flush out invalidation
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
                      getInterface(Components.interfaces.nsIDOMWindowUtils);
   utils.processUpdates();
 
+  setTimeout(finishTests, 0);
+}
 
+function finishTests() {
   // test that setCapture works on an area element (bug 517737)
   var area = document.getElementById("area");
   synthesizeMouse(area, 5, 5, { type: "mousedown" });
   synthesizeMouseExpectEvent($("otherelement"), 5, 5, { type: "mousemove" },
                              area, "mousemove", "setCapture works on areas");
   synthesizeMouse(area, 5, 5, { type: "mouseup" });
 
   // test that setCapture works on an area element when it is part of an image