Commit c5302412 authored by Lan Wei's avatar Lan Wei Committed by Commit Bot

Revert "Reland "Avoid testRunner.eventSender in"

This reverts commit 01da6796.

Reason for revert:
Test fails on Mac10.14:
https://ci.chromium.org/p/chromium/builders/ci/Mac10.14%20Tests/6447

Original change's description:
> Reland "Avoid testRunner.eventSender in
> overflow-scroll-in-overflow-scroll-scrolled.html"
> 
> Avoid testRunner.eventSender in
> paint/invalidation/scroll/overflow-scroll-in-overflow-scroll-scrolled.html
> 
> TBR=wangxianzhu@chromium.org
> 
> Bug: 1047176
> Change-Id: If4522d945a8e5d2d269bd7e8eedf8b070a81cc6c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298277
> Reviewed-by: Lan Wei <lanwei@chromium.org>
> Commit-Queue: Lan Wei <lanwei@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#788491}

TBR=wangxianzhu@chromium.org,lanwei@chromium.org

Change-Id: I2f2bafa448c7eb653c2e4b11c22d8157f5dd88f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1047176
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299140Reviewed-by: default avatarLan Wei <lanwei@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788515}
parent f1d1ac7f
<!DOCTYPE html>
<script>
onload = () => {
outerDiv.scrollTop = 300;
innerDiv.scrollTop = 400;
}
</script>
<div style="height: 300px; overflow-y: scroll;" id="outerDiv">
<div style="height: 300px;"></div>
<div style="height: 400px; overflow-y: scroll;" id="innerDiv">
<div style="height: 800px; width: 300px; background: green"></div>
</div>
</div>
<!DOCTYPE html> <!DOCTYPE html>
<script src="../resources/text-based-repaint.js"></script> <html>
<script> <head>
onload = () => { <script src="../resources/text-based-repaint.js" type="text/javascript"></script>
// Scroll the outerDiv until we reach innerDiv. <script>
outerDiv.scrollTop = 300; function repaintTest() {
runRepaintAndPixelTest(); // Now scroll once in the #innerDiv to the green area.
}; if (window.eventSender)
eventSender.mouseScrollBy(0, -10);
function repaintTest() { }
// Now scroll the innerDiv once to the green area. window.addEventListener("load", runRepaintAndPixelTest, false);
innerDiv.scrollTop = 400; </script>
} </head>
</script> <body>
<!-- https://bugs.webkit.org/show_bug.cgi?id=71550 --> <!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element being scrolled off page using javascript. -->
<!-- For the test to pass you should not see any RED or PURPLE, only green --> <!-- For the test to pass you should not see any RED or PURPLE, only green -->
<div style="height: 300px; overflow-y: scroll;" id="outerDiv"> <div style="height: 300px; overflow-y: scroll;" id="outerDiv">
<div style="height: 300px; background: purple;"></div> <div style="height: 300px; background: purple;"></div>
...@@ -21,3 +21,17 @@ function repaintTest() { ...@@ -21,3 +21,17 @@ function repaintTest() {
<div style="height: 400px; width: 300px; background: green"></div> <div style="height: 400px; width: 300px; background: green"></div>
</div> </div>
</div> </div>
<script>
if (window.eventSender) {
if (window.internals)
internals.settings.setScrollAnimatorEnabled(false);
// Scroll the #outerDiv until we reach the #innerDiv.
eventSender.mouseMoveTo(50, 50);
eventSender.mouseScrollBy(0, -8);
} else {
document.write("This test is better run under DumpRenderTree. To manually test it, continuously scroll down on the top-most element. There should be no repaint issue.");
}
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment