Bug 944125 - test_bug602962.xul is racy, r=ehsan
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 28 Nov 2013 18:49:24 +0200
changeset 172670 ad8d31f4bd394f68ef4de022aae306772d60d9d7
parent 172669 e6484a878eeed6df777567c9767e1dd7b8f59231
child 172671 eb8b520e0aa095d42b00632a1d2c60941f97e1eb
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs944125, 602962
milestone28.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 944125 - test_bug602962.xul is racy, r=ehsan
content/events/test/test_bug602962.xul
--- a/content/events/test/test_bug602962.xul
+++ b/content/events/test/test_bug602962.xul
@@ -68,16 +68,22 @@ function resize() {
       finish();
     }, 0);
   }, true);
 
   win.resizeTo(oldWidth, oldHeight);
 }
 
 function finish() {
+  if (win.outerWidth != oldWidth ||
+      win.outerHeight != oldHeight) {
+    // We should eventually get back to the original size.
+    setTimeout(finish, 0);
+    return;
+  }
   is(mozBeforeResizeHasFired, true, "The MozBeforeResize event should already have fired");
   sbo.scrollBy(scrollX, scrollY);
 
   let x = {}, y = {};
   sbo.getPosition(x, y);
   is(x.value, 200, "Scroll X should have been restored to the value before the resize");
   is(y.value, 0, "Scroll Y should have been restored to the value before the resize");