Bug 944125 - test_bug602962.xul is racy. r=ehsan, a=test-only
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 28 Nov 2013 18:49:24 +0200
changeset 167769 48950cec965531946b634ef8d7ac755851bc2784
parent 167768 4d665954e4db5b22e7416d00bbf5a0e61b61b293
child 167770 9f4b4417d125f472ab2edacb0fee72438f6839af
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, test-only
bugs944125, 602962
milestone27.0
Bug 944125 - test_bug602962.xul is racy. r=ehsan, a=test-only
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");