Changeset 169692 in webkit


Ignore:
Timestamp:
Jun 9, 2014, 10:49:32 AM (11 years ago)
Author:
Simon Fraser
Message:

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:
Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LayoutTests/ChangeLog

    r169691 r169692  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix more latched scrolling test flakiness and slowness
     4        https://bugs.webkit.org/show_bug.cgi?id=133601
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Latched scrolling tests were flakey for two reasons. First, the EventSender
     9        wheel events were async from the web to the UI process, and the resulting
     10        synthetic events also async from the UI to the web process. Make them sync
     11        for testing.
     12       
     13        Secondly, the timer-based scrolling tree commit could result in the scrolling
     14        tree (specifically the frame node's notion of the scrollable area and content
     15        size) not being updated before the scrolling thread starts getting wheel events.
     16        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
     17       
     18        Finally remove all the now-unnecessary timeouts from the tests.
     19
     20        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt:
     21        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html:
     22        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html:
     23        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
     24        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html:
     25        * platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html:
     26        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html:
     27        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html:
     28        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
     29        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html:
     30        * platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html:
     31        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
     32        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html:
     33        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html:
     34        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt:
     35        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html:
     36        * platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html:
     37
    1382014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
    239
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler-expected.txt

    r169650 r169692  
    5858Page after:  0, div after: 666
    5959PASS Page did not receive wheel events.
    60 Document was initial target for 4 of the wheel events.
     60Document was initial target for 8 of the wheel events.
    6161(GraphicsLayer
    6262  (anchor 0.00 0.00)
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div-with-handler.html

    r169650 r169692  
    4747var continueCount = 5;
    4848
    49 function checkForScroll() {
    50 
     49function checkForScroll()
     50{
    5151    // The div should not have scrolled at all.
    5252    var pageScrollPositionAfter = document.body.scrollTop;
     
    7171}
    7272
    73 function scrollTest() {
     73function scrollTest()
     74{
    7475    pageScrollPositionBefore = document.body.scrollTop;
    7576
     
    8586    eventSender.mouseMoveTo(startPosX, startPosY);
    8687    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    89     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    90     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    91     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    92     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    93     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    94     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    95     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    96     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    97     setTimeout(checkForScroll, 100);
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     90    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     91    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     92    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     95    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     96    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     97    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     98    checkForScroll();
    9899}
    99100
    100 function setupTopLevel() {
    101 
     101function setupTopLevel()
     102{
    102103    if (window.eventSender) {
    103104        testRunner.dumpAsText();
    104105        testRunner.waitUntilDone();
    105 
    106         setTimeout(scrollTest, 1000);
     106        setTimeout(scrollTest, 0);
    107107    } else {
    108108        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-div.html

    r169650 r169692  
    4141var continueCount = 5;
    4242
    43 function checkForScroll() {
    44 
     43function checkForScroll()
     44{
    4545    // The div should not have scrolled at all.
    4646    var pageScrollPositionAfter = document.body.scrollTop;
     
    6363}
    6464
    65 function scrollTest() {
     65function scrollTest()
     66{
    6667    pageScrollPositionBefore = document.body.scrollTop;
    6768
     
    7778    eventSender.mouseMoveTo(startPosX, startPosY);
    7879    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    79     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    80     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    81     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    82     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    83     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    84     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    89     setTimeout(checkForScroll, 100);
     80    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     81    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     82    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     83    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     84    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     85    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     86    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     87    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     90    checkForScroll();
    9091}
    9192
    92 function setupTopLevel() {
    93 
     93function setupTopLevel()
     94{
    9495    if (window.eventSender) {
    9596        testRunner.dumpAsText();
    9697        testRunner.waitUntilDone();
    9798
    98         setTimeout(scrollTest, 1000);
     99        setTimeout(scrollTest, 0);
    99100    } else {
    100101        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler-expected.txt

    r168244 r169692  
    5757Page after:  70, div after: 0
    5858PASS Scrollable div did not receive wheel events.
    59 Document was initial target for 4 of the wheel events.
     59Document was initial target for 8 of the wheel events.
    6060(GraphicsLayer
    6161  (anchor 0.00 0.00)
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe-with-handler.html

    r169650 r169692  
    3535function onLoad() {
    3636    document.addEventListener("mousewheel", onScrollWheel);
     37    window.addEventListener("scroll", onPageScroll);
    3738    setupTopLevel();
    3839}
     
    4748var continueCount = 5;
    4849
    49 function checkForScroll() {
     50function onPageScroll()
     51{
     52    if (document.body.scrollTop >= 70)
     53        checkForScroll();
     54}
    5055
     56function checkForScroll()
     57{
    5158    // The div should not have scrolled at all.
    5259    var pageScrollPositionAfter = document.body.scrollTop;
     
    7178}
    7279
    73 function scrollTest() {
     80function scrollTest()
     81{
    7482    pageScrollPositionBefore = document.body.scrollTop;
    7583
     
    8391    eventSender.mouseMoveTo(startPosX, startPosY);
    8492    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    89     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    90     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    91     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    92     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    93     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    94     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    95     setTimeout(checkForScroll, 100);
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     95    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     96    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     97    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     98    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     99    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     100    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     101    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     102    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     103
     104    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     105    setTimeout(checkForScroll, 500);
    96106}
    97107
    98 function setupTopLevel() {
    99 
     108function setupTopLevel()
     109{
    100110    if (window.eventSender) {
    101111        testRunner.dumpAsText();
    102112        testRunner.waitUntilDone();
    103113
    104         setTimeout(scrollTest, 1000);
     114        setTimeout(scrollTest, 0);
    105115    } else {
    106116        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-div-latched-mainframe.html

    r169650 r169692  
    3030function onLoad() {
    3131    setupTopLevel();
     32    window.addEventListener("scroll", onPageScroll);
    3233}
    3334</script>
     
    4142var continueCount = 5;
    4243
    43 function checkForScroll() {
     44function onPageScroll()
     45{
     46    if (document.body.scrollTop >= 70)
     47        checkForScroll();
     48}
    4449
     50function checkForScroll()
     51{
    4552    // The div should not have scrolled at all.
    4653    var pageScrollPositionAfter = document.body.scrollTop;
     
    6370}
    6471
    65 function scrollTest() {
     72function scrollTest()
     73{
    6674    pageScrollPositionBefore = document.body.scrollTop;
    6775
     
    7583    eventSender.mouseMoveTo(startPosX, startPosY);
    7684    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    77     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    78     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    79     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    80     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    81     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    82     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    83     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    84     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    87     setTimeout(checkForScroll, 100);
     85    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     86    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     87    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     90    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     91    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     92    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     95
     96    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     97    setTimeout(checkForScroll, 500);
    8898}
    8999
    90 function setupTopLevel() {
    91 
     100function setupTopLevel()
     101{
    92102    if (window.eventSender) {
    93103        testRunner.dumpAsText();
    94104        testRunner.waitUntilDone();
    95105
    96         setTimeout(scrollTest, 1000);
     106        setTimeout(scrollTest, 0);
    97107    } else {
    98108        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe-with-handler.html

    r169311 r169692  
    2323var continueCount = 5;
    2424
    25 function checkForScroll() {
    26 
     25function checkForScroll()
     26{
    2727    // The IFrame should not have scrolled at all.
    2828    var pageScrollPositionAfter = document.body.scrollTop;
     
    4747}
    4848
    49 function scrollTest() {
    50     // See where our IFrame lives:
     49function scrollTest()
     50{
    5151    pageScrollPositionBefore = document.body.scrollTop;
    5252
     
    6464    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    6565    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    66     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    67     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    68     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    69     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    70     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    71     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    72     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    73     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    74     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    75     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    76     setTimeout(checkForScroll, 100);
     66    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     67    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     68    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     69    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     70    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     71    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     72    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     73    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     74    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     75    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     76    checkForScroll();
    7777}
    7878
    79 function setupTopLevel() {
    80 
     79function setupTopLevel()
     80{
    8181    if (window.eventSender) {
    8282        testRunner.dumpAsText();
    8383        testRunner.waitUntilDone();
    8484
    85         setTimeout(scrollTest, 1000);
     85        setTimeout(scrollTest, 0);
    8686    } else {
    8787        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-iframe.html

    r169311 r169692  
    1313var continueCount = 5;
    1414
    15 function checkForScroll() {
    16 
    17     // The IFrame should not have scrolled at all.
     15function checkForScroll()
     16{
    1817    var pageScrollPositionAfter = document.body.scrollTop;
    1918    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
     
    3534}
    3635
    37 function scrollTest() {
    38     // See where our IFrame lives:
     36function scrollTest()
     37{
    3938    pageScrollPositionBefore = document.body.scrollTop;
    4039
     
    4645    iFrameScrollPositionBefore = iFrameBody.scrollTop;
    4746
    48     // Scroll the #source until we reach the #target.
    4947    var startPosX = iframeTarget.offsetLeft + 20;
    5048    debug("IFrame display height = " + iframeTarget.clientHeight);
    51     var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
    52     eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
     49    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42;
     50    eventSender.mouseMoveTo(startPosX, startPosY);
    5351    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    54     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    55     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    56     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    57     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    58     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    59     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    60     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    61     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    62     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    63     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    64     setTimeout(checkForScroll, 100);
     52    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     53    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     54    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     55    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     56    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     57    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     58    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     59    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     60    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     61    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     62    checkForScroll();
    6563}
    6664
    67 function setupTopLevel() {
    68 
     65function setupTopLevel()
     66{
    6967    if (window.eventSender) {
    7068        testRunner.dumpAsText();
    7169        testRunner.waitUntilDone();
    7270
    73         setTimeout(scrollTest, 1000);
     71        setTimeout(scrollTest, 0);
    7472    } else {
    7573        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt

    r168244 r169692  
    1313Page after:  70, IFrame after: 0
    1414PASS IFrame did not receive wheel events.
    15 Document was initial target for 4 of the wheel events.
     15Document was initial target for 8 of the wheel events.
    1616(GraphicsLayer
    1717  (anchor 0.00 0.00)
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe-with-handler.html

    r169311 r169692  
    1212function onLoad() {
    1313    document.addEventListener("mousewheel", onScrollWheel);
     14    window.addEventListener("scroll", onPageScroll);
    1415}
    1516</script>
     
    2324var continueCount = 5;
    2425
    25 function checkForScroll() {
     26function onPageScroll()
     27{
     28    if (document.body.scrollTop >= 70)
     29        checkForScroll();
     30}
    2631
     32function checkForScroll()
     33{
    2734    // The IFrame should not have scrolled at all.
    2835    var pageScrollPositionAfter = document.body.scrollTop;
     
    4754}
    4855
    49 function scrollTest() {
    50     // See where our IFrame lives:
     56function scrollTest()
     57{
    5158    pageScrollPositionBefore = document.body.scrollTop;
    5259    iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
     
    5461    iframeTarget = document.getElementById('target');
    5562
    56     // Scroll the #source until we reach the #target.
    5763    var startPosX = iframeTarget.offsetLeft + 20;
    58     var startPosY = iframeTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
    59     eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
     64    var startPosY = iframeTarget.offsetTop - 42;
     65    eventSender.mouseMoveTo(startPosX, startPosY);
    6066    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    61     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    62     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    63     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    64     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    65     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    66     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    67     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    68     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    69     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    70     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    71     setTimeout(checkForScroll, 100);
     67    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     68    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     69    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     70    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     71    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     72    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     73    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     74    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     75    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     76    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     77
     78    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     79    setTimeout(checkForScroll, 500);
    7280}
    7381
    74 function setupTopLevel() {
    75 
     82function setupTopLevel()
     83{
    7684    if (window.eventSender) {
    7785        testRunner.dumpAsText();
    7886        testRunner.waitUntilDone();
    7987
    80         setTimeout(scrollTest, 1000);
     88        setTimeout(scrollTest, 0);
    8189    } else {
    8290        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-iframe-latched-mainframe.html

    r169650 r169692  
    55<script src="../../../resources/js-test-pre.js"></script>
    66</head>
    7 <body>
     7<body onload="onLoad();">
    88<script>
    99
     
    1313var continueCount = 5;
    1414
    15 function checkForScroll() {
     15function onLoad()
     16{
     17    window.addEventListener("scroll", onPageScroll);
     18}
    1619
     20function onPageScroll()
     21{
     22    if (document.body.scrollTop >= 70)
     23        checkForScroll();
     24}
     25
     26function checkForScroll()
     27{
    1728    // The IFrame should not have scrolled at all.
    1829    var pageScrollPositionAfter = document.body.scrollTop;
     
    3546}
    3647
    37 function scrollTest() {
     48function scrollTest()
     49{
    3850    pageScrollPositionBefore = document.body.scrollTop;
    3951    iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
    4052
    4153    iframeTarget = document.getElementById('target');
    42 
    43     // Scroll the #source until we reach the #target.
     54   
    4455    var startPosX = iframeTarget.offsetLeft + 20;
    4556    var startPosY = iframeTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
    4657    eventSender.mouseMoveTo(startPosX, startPosY);
    4758    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    48     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    49     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    50     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    51     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    52     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    53     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    54     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    55     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    56     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    57     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    58     setTimeout(checkForScroll, 100);
     59    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     60    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     61    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     62    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     63    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     64    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     65    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     66    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     67    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     68    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     69
     70    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     71    setTimeout(checkForScroll, 500);
    5972}
    6073
    61 function setupTopLevel() {
    62 
     74function setupTopLevel()
     75{
    6376    if (window.eventSender) {
    6477        testRunner.dumpAsText();
    6578        testRunner.waitUntilDone();
    6679
    67         setTimeout(scrollTest, 1000);
     80        setTimeout(scrollTest, 0);
    6881    } else {
    6982        var messageLocation = document.getElementById('parent');
     
    7891
    7992</script>
    80 <div id="parent" style="height: 2000px">
     93<div id="parent" style="height: 2000px;">
    8194    <div id="source" style="height: 100px">
    8295        Put mouse here and flick downwards
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler-expected.txt

    r168244 r169692  
    1515Page after:  70, select after: 0
    1616PASS Select did not receive wheel events.
    17 Document was initial target for 4 of the wheel events.
     17Document was initial target for 8 of the wheel events.
    1818(GraphicsLayer
    1919  (anchor 0.00 0.00)
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe-with-handler.html

    r169650 r169692  
    3535function onLoad() {
    3636    document.addEventListener("mousewheel", onScrollWheel);
     37    window.addEventListener("scroll", onPageScroll);
    3738    setupTopLevel();
    3839}
     
    4748var continueCount = 5;
    4849
    49 function checkForScroll() {
     50function onPageScroll()
     51{
     52    if (document.body.scrollTop >= 70)
     53        checkForScroll();
     54}
    5055
     56function checkForScroll()
     57{
    5158    // The select should not have scrolled at all.
    5259    var pageScrollPositionAfter = document.body.scrollTop;
     
    7178}
    7279
    73 function scrollTest() {
     80function scrollTest()
     81{
    7482    pageScrollPositionBefore = document.body.scrollTop;
    7583
     
    7886    selectScrollPositionBefore = selectTarget.scrollTop;
    7987
    80     // Scroll the #source until we reach the #target.
    8188    var startPosX = Math.round(selectTarget.offsetLeft) + 20;
    8289    var startPosY = Math.round(selectTarget.offsetTop) - 42;
    8390    eventSender.mouseMoveTo(startPosX, startPosY);
    8491    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    89     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    90     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    91     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    92     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    93     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    94     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    95     setTimeout(checkForScroll, 100);
     92    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     95    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     96    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     97    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     98    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     99    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     100    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     101    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     102
     103    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     104    setTimeout(checkForScroll, 500);
    96105}
    97106
    98 function setupTopLevel() {
    99 
     107function setupTopLevel()
     108{
    100109    if (window.eventSender) {
    101110        testRunner.dumpAsText();
    102111        testRunner.waitUntilDone();
    103112
    104         setTimeout(scrollTest, 1000);
     113        setTimeout(scrollTest, 0);
    105114    } else {
    106115        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-mainframe.html

    r169650 r169692  
    2929<script>
    3030function onLoad() {
     31    window.addEventListener("scroll", onPageScroll);
    3132    setupTopLevel();
    3233}
     
    4142var continueCount = 5;
    4243
    43 function checkForScroll() {
     44function onPageScroll()
     45{
     46    if (document.body.scrollTop >= 70)
     47        checkForScroll();
     48}
    4449
     50function checkForScroll()
     51{
    4552    // The select should not have scrolled at all.
    4653    var pageScrollPositionAfter = document.body.scrollTop;
     
    6370}
    6471
    65 function scrollTest() {
     72function scrollTest()
     73{
    6674    pageScrollPositionBefore = document.body.scrollTop;
    6775
     
    7583    eventSender.mouseMoveTo(startPosX, startPosY);
    7684    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    77     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    78     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    79     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    80     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    81     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    82     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    83     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    84     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    87     setTimeout(checkForScroll, 100);
     85    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     86    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     87    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     90    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     91    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     92    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     95
     96    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     97    setTimeout(checkForScroll, 500);
    8898}
    8999
    90 function setupTopLevel() {
    91 
     100function setupTopLevel()
     101{
    92102    if (window.eventSender) {
    93103        testRunner.dumpAsText();
    94104        testRunner.waitUntilDone();
    95105
    96         setTimeout(scrollTest, 1000);
     106        setTimeout(scrollTest, 0);
    97107    } else {
    98108        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler-expected.txt

    r169650 r169692  
    1616Page after:  0, select after: 140
    1717PASS Page did not receive wheel events.
    18 Document was initial target for 4 of the wheel events.
     18Document was initial target for 8 of the wheel events.
    1919(GraphicsLayer
    2020  (anchor 0.00 0.00)
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select-with-handler.html

    r169650 r169692  
    4747var continueCount = 5;
    4848
    49 function checkForScroll() {
    50 
     49function checkForScroll()
     50{
    5151    // The page should not have scrolled at all.
    5252    var pageScrollPositionAfter = document.body.scrollTop;
     
    7171}
    7272
    73 function scrollTest() {
     73function scrollTest()
     74{
    7475    pageScrollPositionBefore = document.body.scrollTop;
    7576
     
    8485    eventSender.mouseMoveTo(startPosX, startPosY);
    8586    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    89     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    90     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    91     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    92     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    93     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    94     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    95     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    96     setTimeout(checkForScroll, 100);
     87    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     90    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     91    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     92    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     93    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     94    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     95    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     96    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     97    checkForScroll();
    9798}
    9899
    99 function setupTopLevel() {
    100 
     100function setupTopLevel()
     101{
    101102    if (window.eventSender) {
    102103        testRunner.dumpAsText();
    103104        testRunner.waitUntilDone();
    104105
    105         setTimeout(scrollTest, 1000);
     106        setTimeout(scrollTest, 0);
    106107    } else {
    107108        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fast-scroll-select-latched-select.html

    r169650 r169692  
    4141var continueCount = 5;
    4242
    43 function checkForScroll() {
    44 
     43function checkForScroll()
     44{
    4545    // The page should not have scrolled at all.
    4646    var pageScrollPositionAfter = document.body.scrollTop;
     
    6363}
    6464
    65 function scrollTest() {
     65function scrollTest()
     66{
    6667    pageScrollPositionBefore = document.body.scrollTop;
    6768
     
    7778    eventSender.mouseMoveTo(startPosX, startPosY);
    7879    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
    79     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', true);
    80     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    81     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', true);
    82     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', true);
    83     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', true);
    84     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    85     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    86     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    87     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', true);
    88     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', true);
    89     setTimeout(checkForScroll, 100);
     80    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     81    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     82    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     83    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     84    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
     85    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     86    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     87    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     88    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     89    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
     90    checkForScroll();
    9091}
    9192
    92 function setupTopLevel() {
    93 
     93function setupTopLevel()
     94{
    9495    if (window.eventSender) {
    9596        testRunner.dumpAsText();
    9697        testRunner.waitUntilDone();
    9798
    98         setTimeout(scrollTest, 1000);
     99        setTimeout(scrollTest, 0);
    99100    } else {
    100101        var messageLocation = document.getElementById('parent');
  • TabularUnified trunk/Source/WebKit2/ChangeLog

    r169688 r169692  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix more latched scrolling test flakiness and slowness
     4        https://bugs.webkit.org/show_bug.cgi?id=133601
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Latched scrolling tests were flakey for two reasons. First, the EventSender
     9        wheel events were async from the web to the UI process, and the resulting
     10        synthetic events also async from the UI to the web process. Make them sync
     11        for testing.
     12       
     13        Secondly, the timer-based scrolling tree commit could result in the scrolling
     14        tree (specifically the frame node's notion of the scrollable area and content
     15        size) not being updated before the scrolling thread starts getting wheel events.
     16        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
     17       
     18        Finally remove all the now-unnecessary timeouts from the tests.
     19
     20        * WebProcess/WebPage/WebPage.cpp:
     21        (WebKit::WebPage::wheelEventSyncForTesting):
     22
    1232014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
    224
  • TabularUnified trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r169625 r169692  
    18801880    CurrentEvent currentEvent(wheelEvent);
    18811881
     1882    if (ScrollingCoordinator* scrollingCoordinator = m_page->scrollingCoordinator())
     1883        scrollingCoordinator->commitTreeStateIfNeeded();
     1884
    18821885    handled = handleWheelEvent(wheelEvent, m_page.get());
    18831886}
  • TabularUnified trunk/Tools/ChangeLog

    r169688 r169692  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix more latched scrolling test flakiness and slowness
     4        https://bugs.webkit.org/show_bug.cgi?id=133601
     5
     6        Reviewed by Brent Fulgham.
     7       
     8        Latched scrolling tests were flakey for two reasons. First, the EventSender
     9        wheel events were async from the web to the UI process, and the resulting
     10        synthetic events also async from the UI to the web process. Make them sync
     11        for testing.
     12       
     13        Secondly, the timer-based scrolling tree commit could result in the scrolling
     14        tree (specifically the frame node's notion of the scrollable area and content
     15        size) not being updated before the scrolling thread starts getting wheel events.
     16        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
     17       
     18        Finally remove all the now-unnecessary timeouts from the tests.
     19
     20        * WebKitTestRunner/mac/EventSenderProxy.mm:
     21        (WTR::EventSenderProxy::mouseMoveTo):
     22        (WTR::EventSenderProxy::mouseScrollBy):
     23        (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
     24
    1252014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
    226
  • TabularUnified trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm

    r169662 r169692  
    3333#import <Carbon/Carbon.h>
    3434#import <WebKit/WKString.h>
     35#import <WebKit/WKPagePrivate.h>
    3536#import <wtf/RetainPtr.h>
    3637
     
    219220    if (targetView) {
    220221        [NSApp _setCurrentEvent:event];
     222        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
    221223        [targetView mouseMoved:event];
     224        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
    222225        [NSApp _setCurrentEvent:nil];
    223226    } else {
     
    456459    if (NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]]) {
    457460        [NSApp _setCurrentEvent:event];
     461        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
    458462        [targetView scrollWheel:event];
     463        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
    459464        [NSApp _setCurrentEvent:nil];
    460465    } else {
    461466        NSPoint location = [event locationInWindow];
    462         WTFLogAlways("mouseScrollByWithWheelAndMomentumPhases failed to find the target view at %f,%f\n", location.x, location.y);
     467        WTFLogAlways("mouseScrollBy failed to find the target view at %f,%f\n", location.x, location.y);
    463468    }
    464469}
     
    493498    if (NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]]) {
    494499        [NSApp _setCurrentEvent:event];
     500        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), true);
    495501        [targetView scrollWheel:event];
     502        WKPageSetShouldSendEventsSynchronously(m_testController->mainWebView()->page(), false);
    496503        [NSApp _setCurrentEvent:nil];
    497504    } else {
Note: See TracChangeset for help on using the changeset viewer.