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 156906 49694180373f2ca5d19740d5c55da446a731eeed
parent 156905 c5eda4db2804e412a69888d20d7078043abf0bce
child 156907 e52eb86c3c02a16ea6d712633ec067e8946b3872
push id378
push userryanvm@gmail.com
push dateWed, 18 Dec 2013 17:13:07 +0000
reviewersehsan, test-only
bugs944125, 602962
milestone26.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");