Bug 1285176 - fix intermittent test_mousecapture.xhtml by removing a check whose success we can't guarantee, r=kats
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 18 Jan 2017 16:10:49 +0000
changeset 374914 99e0fc974ccedc2dc00152f73ecac120b074fcb3
parent 374913 7261ee7e3e67c62531ca1e745da5e7b714b5d4ab
child 374915 123ee1fcc26835b01167b3bb5699f9204f7dd117
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1285176
milestone53.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 1285176 - fix intermittent test_mousecapture.xhtml by removing a check whose success we can't guarantee, r=kats MozReview-Commit-ID: KzuOs4e9mCe
toolkit/content/tests/mochitest/test_mousecapture.xhtml
--- a/toolkit/content/tests/mochitest/test_mousecapture.xhtml
+++ b/toolkit/content/tests/mochitest/test_mousecapture.xhtml
@@ -69,22 +69,23 @@ function selectionScrollCheck() {
     otherWindow.removeEventListener("scroll", selectionScrollDone);
 
     var selectedText = otherWindow.getSelection().toString().replace(/\r/g, "");
     is(selectedText, "One\n\nTwo", "text is selected");
 
     // should have scrolled 20 pixels from the mousemove above and at least 6
     // extra 20-pixel increments from the selection scroll timer. "At least 6"
     // because we waited for 6 scroll events but multiple scrolls could get
-    // coalesced into a single scroll event. Therefore we allow 6-15 scrolls,
-    // which corresponds to a scroll position of 140 to 320. The 15 is chosen
-    // arbitrarily and can be adjusted.
+    // coalesced into a single scroll event, and paints could be delayed when
+    // the window loads when the compositor is busy. As a result, we have no
+    // real guarantees about the upper bound here, and as the upper bound is
+    // not important for what we're testing here, we don't check it.
     var scrollY = otherWindow.scrollY;
+    info(`Scrolled ${scrollY} pixels`);
     ok(scrollY >= 140, "selection scroll position after timer is at least 140");
-    ok(scrollY <= 320, "selection scroll position after timer is not more than 320");
     ok((scrollY % 20) == 0, "selection scroll position after timer is multiple of 20");
 
     synthesizeMouse(element, 4, otherWindow.innerHeight + 25, { type: "mouseup" }, otherWindow);
     disableNonTestMouseEvents(false);
     otherWindow.close();
 
     if (loadInWindow) {
       SimpleTest.finish();