haikuwebkit/LayoutTests/scrollbars/scroll-rtl-or-bt-layer.html

104 lines
2.3 KiB
HTML
Raw Permalink Normal View History

<html>
<body>
<p>This test requires DumpRenderTree. To test manually, try to scroll the
blue div to the left and the red div up using the scrollbar arrows or the
mouse wheel. The test passes if the divs scroll.</p>
<div id='rtl' style="direction: rtl; width: 100px; overflow: auto; border: 1px solid blue;">
01234567890123456789
</div>
<div id='bt' style="-webkit-writing-mode: horizontal-bt; height: 100px; overflow: auto; border: 1 px solid red;">
aaa<br>
bbb<br>
ccc<br>
ddd<br>
eee<br>
fff<br>
ggg<br>
hhh<br>
iii<br>
jjj<br>
kkk
</div>
<div id="console"></div>
<script>
function log(message)
{
document.getElementById("console").innerHTML += message + "<br>";
}
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
function centerMouseOn(element)
{
eventSender.mouseMoveTo(element.offsetLeft + element.offsetWidth / 2,
element.offsetTop + element.offsetHeight / 2);
}
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
function testRTL()
{
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
var rtl = document.getElementById("rtl");
centerMouseOn(rtl);
var offsetBefore = rtl.scrollLeft;
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
rtl.onscroll = function() {
var offsetAfter = rtl.scrollLeft;
if (offsetBefore > offsetAfter)
log("rtl: PASS");
else {
log("rtl: FAIL");
log("scrollLeft before: " + offsetBefore);
log("scrollLeft after: " + offsetAfter);
}
testBT();
}
eventSender.mouseScrollBy(1, 0);
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
}
function testBT()
{
var bt = document.getElementById("bt");
centerMouseOn(bt);
offsetBefore = bt.scrollTop;
bt.onscroll = function() {
offsetAfter = bt.scrollTop;
if (offsetBefore > offsetAfter)
log("bt: PASS");
else {
log("bt: FAIL");
log("scrollTop before: " + offsetBefore);
log("scrollTop after: " + offsetAfter);
}
document.body.removeChild(document.getElementById("rtl"));
document.body.removeChild(document.getElementById("bt"));
testRunner.notifyDone();
}
eventSender.mouseScrollBy(0, 1);
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
}
function test()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
if (!window.eventSender || !window.eventSender.mouseScrollBy) {
log("This test requires DumpRenderTree with eventSender.mouseScrollBy.");
return;
}
Improve how UI events are dispatched by WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=148326 Reviewed by Anders Carlsson. Source/WebKit2: Added "fully synchronous mode for testing", in which all messages are dispatched synchronously. When an async message is sent in this mode, it is wrapped into a sync one automatically. A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(), or by calling WKContextConfigurationAllowFullySynchronousModeForTesting(). This makes sure that we don't increase potential for IPC misuse. * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages! * UIProcess/API/C/WKPage.cpp: (WKPageSetShouldSendEventsSynchronously): Deleted. * UIProcess/API/C/WKPagePrivate.h: We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted. Removed code that was only needed to support pseudo-syncronous scrolling in tests. * Platform/IPC/Connection.cpp: (IPC::Connection::sendMessage): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: (IPC::Connection::allowFullySynchronousModeForTesting): (IPC::Connection::sendSync): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::UUID): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): (IPC::MessageEncoder::setFullySynchronousModeForTesting): (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageEncoder.h: (IPC::MessageEncoder::UUID): * Platform/IPC/MessageFlags.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationAllowFullySynchronousModeForTesting): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleMouseEvent): (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePagePostMessage): (WKBundlePagePostSynchronousMessageForTesting): (WKBundlePagePostSynchronousMessage): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::handleWheelEvent): (WebKit::WebPage::wheelEvent): (WebKit::handleKeyEvent): (WebKit::WebPage::keyEvent): (WebKit::WebPage::validateCommand): (WebKit::WebPage::touchEvent): (WebKit::WebPage::scroll): (WebKit::WebPage::postMessage): (WebKit::WebPage::postSynchronousMessageForTesting): (WebKit::WebPage::mouseEventSyncForTesting): Deleted. (WebKit::WebPage::wheelEventSyncForTesting): Deleted. (WebKit::WebPage::keyEventSyncForTesting): Deleted. (WebKit::WebPage::touchEventSyncForTesting): Deleted. (WebKit::WebPage::postSynchronousMessage): Deleted. * WebProcess/WebPage/WebPage.h: Tools: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always asynchronous (and really, it has always been for the most part). * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Ditto. (WTR::EventSendingController::keyDown): Ditto. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto. (WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used to be done in custom WebKit2 code for test wheel event handling. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version. (WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird. (WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming. (WTR::EventSendingController::addTouchPoint): Ditto. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetWindowIsKey): (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::InjectedBundle::isGeolocationProviderActive): (WTR::InjectedBundle::shouldProcessWorkQueue): Updated for WKBundlePagePostSynchronousMessage renaming. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::secureEventInputIsEnabled): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Allow handling the new test style messages. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls to WKPageSetShouldSendEventsSynchronously, which we no longer need. (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved "MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously. (WTR::EventSenderProxy::keyDown): Ditto. (WTR::EventSenderProxy::mouseScrollBy): Ditto. (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto. LayoutTests: * fast/events/clear-drag-state-expected.txt: * fast/events/clear-drag-state.html: * platform/mac-wk2/TestExpectations: This test used to accidentally pass in WebKit2, but it didn't actually check for the problem. This patch improves WK2 behavior, which makes the test fail. Changed the test to not pass accidentally, and added it to WK2 test expectations. * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt: * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: Updated the test to be fully async. * fast/events/wheelevent-basic-expected.txt: * fast/events/wheelevent-basic.html: Updated the test to be fully async, got rid of tab characters. * fast/events/wheelevent-mousewheel-interaction.html: * fast/forms/search/search-scroll-hidden-decoration-container-crash.html: * fast/frames/flattening/scrolling-in-object.html: Updated these tests to be fully async. Since they check for something that happens asynchronously, and doesn't have an end event, they have to use setTimeout. * fast/scrolling/latching/iframe_in_iframe.html: * fast/scrolling/latching/scroll-div-latched-div.html: * fast/scrolling/latching/scroll-div-latched-mainframe.html: * fast/scrolling/latching/scroll-div-no-latching.html: * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: * fast/scrolling/latching/scroll-iframe-fragment.html: * fast/scrolling/latching/scroll-iframe-latched-iframe.html: * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: * fast/scrolling/latching/scroll-latched-nested-div.html: * fast/scrolling/latching/scroll-nested-iframe.html: * fast/scrolling/latching/scroll-select-bottom-test.html: * fast/scrolling/latching/scroll-select-latched-mainframe.html: * fast/scrolling/latching/scroll-select-latched-select.html: Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls. We no longer need multiple events for scroll snap animation to start, and due to the way we coalesce events, having multiple events resulted in getting too high velocity. Removed async scrolling argument form the function calls, because it's now always async. * platform/mac-wk1/TestExpectations: * platform/mac/TestExpectations: Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html to WK1 expectations, because the test needn't be skipped on WK2. * scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored it for clarity. * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: * tiled-drawing/scrolling/iframe_in_iframe.html: * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html: * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: * tiled-drawing/scrolling/wheel-events-with-no-delta.html: Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching. * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: Removed debug output about how many events are received. The number may vary due to coalescing. Canonical link: https://commits.webkit.org/166430@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-21 23:09:54 +00:00
testRTL();
}
test();
</script>
</body>
</html>