Fix more latched scrolling test flakiness and slowness
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2014 17:49:32 +0000 (17:49 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2014 17:49:32 +0000 (17:49 +0000)
commit7a6f14db43f1a8c7d2cb48dca80883687118dbb4
tree4f9da3e4b3eef05b51a857b43e0c4c96061771b5
parent5c01e31c7f79401e584723299cfdeeab2b78d1dd
Fix more latched scrolling test flakiness and slowness
https://bugs.webkit.org/show_bug.cgi?id=133601

Reviewed by Brent Fulgham.

Source/WebKit2:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::wheelEventSyncForTesting):

Tools:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):

LayoutTests:

Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.

Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.

Finally remove all the now-unnecessary timeouts from the tests.

* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html:
* platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html
LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/mac/EventSenderProxy.mm