Changeset 256657 in webkit


Ignore:
Timestamp:
Feb 14, 2020 5:01:04 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Fix flaky tests that scroll before first paint
https://bugs.webkit.org/show_bug.cgi?id=207780

After https://bugs.webkit.org/show_bug.cgi?id=207516, a couple of tests are now flaky. This
is because that patch delays first paint until there is enough content to render, and some
of these tests are issuing scroll events on controls before those controls render. To fix
this, we delay issuing the events until after the page loads.

Patch by Ben Nham <Ben Nham> on 2020-02-14
Reviewed by Simon Fraser.

  • fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
  • fast/scrolling/scroll-container-horizontally.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r256656 r256657  
     12020-02-14  Ben Nham  <nham@apple.com>
     2
     3        Fix flaky tests that scroll before first paint
     4        https://bugs.webkit.org/show_bug.cgi?id=207780
     5
     6        After https://bugs.webkit.org/show_bug.cgi?id=207516, a couple of tests are now flaky. This
     7        is because that patch delays first paint until there is enough content to render, and some
     8        of these tests are issuing scroll events on controls before those controls render. To fix
     9        this, we delay issuing the events until after the page loads.
     10
     11        Reviewed by Simon Fraser.
     12
     13        * fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
     14        * fast/scrolling/scroll-container-horizontally.html:
     15
    1162020-02-14  Truitt Savell  <tsavell@apple.com>
    217
  • trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html

    r227962 r256657  
    1414
    1515<script>
    16     (function() {
     16    window.addEventListener('load', function() {
    1717        if (!window.testRunner) {
    1818            debug("This test only works in the test runner.");
     
    4545            eventSender.mouseScrollBy(0, -5);
    4646        }
    47     })();
     47    });
    4848</script>
  • trunk/LayoutTests/fast/scrolling/scroll-container-horizontally.html

    r201476 r256657  
    2323</div>
    2424<script>
    25   if (window.eventSender && window.testRunner) {
    26     testRunner.waitUntilDone();
    27     testRunner.dumpAsText();
     25  function runTest() {
    2826    eventSender.monitorWheelEvents();
    2927    // Scroll vertically to reach the bottom scrollable container.
     
    4947        testRunner.notifyDone();
    5048        });
    51         });
     49    });
     50  }
     51
     52  if (window.eventSender && window.testRunner) {
     53    testRunner.waitUntilDone();
     54    testRunner.dumpAsText();
     55    window.addEventListener('load', runTest);
    5256  }
    5357</script>
Note: See TracChangeset for help on using the changeset viewer.