Commit 3477f9eb authored by Jian Li's avatar Jian Li Committed by Commit Bot

Revert "Avoid testRunner.eventSender in"

This reverts commit 9819cecd.

Reason for revert: 
https://ci.chromium.org/p/chromium/builders/ci/Mac10.14%20Tests/6434

Original change's description:
> Avoid testRunner.eventSender in
> paint/invalidation/table/table-overflow-scroll-in-overflow-scroll-scrolled.html
> 
> Bug: 1047176
> Change-Id: Iba4344ebc6d44f6e122c3871cb0fee5454553a9a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297100
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#788218}

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

Change-Id: I10e2320a515fa2b5162248ac32667b0e1a622077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1047176
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298347Reviewed-by: default avatarJian Li <jianli@chromium.org>
Commit-Queue: Jian Li <jianli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788374}
parent 2a30785b
<!DOCTYPE html>
<script>
onload = () => {
outerDiv.scrollTop = 300;
innerDiv.scrollTop = 404;
}
</script>
<div style="height: 300px; overflow-y: scroll;" id="outerDiv">
<div style="height: 300px;"></div>
<div style="height: 400px; overflow-y: scroll;" id="innerDiv">
<table>
<tr><td style="height: 800px; width: 300px; background: green"></td></tr>
</table>
</div>
</div>
<!DOCTYPE html>
<script src="../resources/text-based-repaint.js"></script>
<script>
function repaintTest() {
// Now scroll the innerDiv once to the green area.
innerDiv.scrollTop = 406;
}
window.addEventListener("load", runRepaintAndPixelTest, false);
</script>
<html>
<head>
<script src="../resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest() {
// Now scroll once in the #innerDiv to the green area.
if (window.eventSender)
eventSender.mouseScrollBy(0, -10);
}
window.addEventListener("load", runRepaintAndPixelTest, false);
</script>
</head>
<body>
<!-- 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 -->
<div style="height: 300px; overflow-y: scroll;" id="outerDiv">
<div style="height: 300px; background: purple;"></div>
......@@ -18,6 +24,16 @@ window.addEventListener("load", runRepaintAndPixelTest, false);
</div>
</div>
<script>
// Scroll the outerDiv until we reach the innerDiv.
outerDiv.scrollTop = 300;
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