Closed Bug 1219953 Opened 10 years ago Closed 10 years ago

Intermittent browser_markupview_dragdrop_autoscroll.js | The view was scrolled down - | The view was scrolled up -

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: KWierso, Assigned: sjakthol)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Bug 1219953 - Consider Markup View autoscroll finished only if the view has not scrolled for 30 consecutive frames. r?pbrosset Waiting for 50ms and checking if the scrollTop has changed does not necessarily mean that the scrolling has stopped (or even started). It might also mean that a GC has blocked the autoscroll interval from running and the scrolling will happen in a few moments. If the view hasn't even started to scroll, the assertion that the view has scrolled fails. If the view has started to scroll, the next call to waitForViewScroll() might resolve when before the direction of the scrolling is reversed causing the assertions that the direction has changed to fail. Instead of relying on intervals to detect if scrolling has stopped, the test could wait for a certain number of frames during which the view has not scrolled to determine if the scrolling has ended. This method has successfully been used in layout/base/tests/test_scroll_snapping.html to detect when scrolling has stopped. These changes make browser_markupview_dragdrop_autoscroll.js to use the previously presented method to detect the end of markup-view autoscroll. The code used in the layout test has been included in the test and modified to yield and use promises when waiting for a frame.
Attachment #8690492 - Flags: review?(pbrosset)
Assignee: nobody → sjakthol
Status: NEW → ASSIGNED
Attachment #8690492 - Flags: review?(pbrosset) → review+
Comment on attachment 8690492 [details] MozReview Request: Bug 1219953 - Consider Markup View autoscroll finished only if the view has not scrolled for 30 consecutive frames. r?pbrosset https://reviewboard.mozilla.org/r/25867/#review23299 Really nice. Thanks.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: