Bug 944125 - test_bug602962.xul is racy, r=ehsan
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 28 Nov 2013 18:49:24 +0200
changeset 157999 ad8d31f4bd394f68ef4de022aae306772d60d9d7
parent 157998 e6484a878eeed6df777567c9767e1dd7b8f59231
child 158000 eb8b520e0aa095d42b00632a1d2c60941f97e1eb
push id36901
push useropettay@mozilla.com
push dateThu, 28 Nov 2013 21:03:26 +0000
treeherdermozilla-inbound@352121e47cc1 [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");