Commit 6acbbb8e authored by Lan Wei's avatar Lan Wei Committed by Commit Bot

Avoid testRunner.eventSender in table auto overflow scroll test

Avoid testRunner.eventSender in
paint/invalidation/table/
table-overflow-auto-in-overflow-auto-scrolled.html

Bug: 1047176
Change-Id: I853c88de12cbf36f854a57f0d0f6216d9c1412d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297099Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788774}
parent 46ec468b
<!DOCTYPE html>
<script>
onload = () => {
outerDiv.scrollTop = 300;
innerDiv.scrollTop = 404;
}
</script>
<div style="height: 300px; overflow-y: auto;" id="outerDiv">
<div style="height: 300px;"></div>
<div style="height: 400px; overflow-y: auto;" id="innerDiv">
<table>
<tr><td style="height: 800px; width: 300px; background: green"></td></tr>
</table>
</div>
</div>
<!DOCTYPE html> <!DOCTYPE html>
<html> <script src="../resources/text-based-repaint.js"></script>
<head> <script>
<script src="../resources/text-based-repaint.js" type="text/javascript"></script> onload = () => {
<script> // Scroll the outerDiv until we reach innerDiv.
function repaintTest() { outerDiv.scrollTop = 300;
// Now scroll once in the #innerDiv to the green area. runRepaintAndPixelTest();
if (window.eventSender) };
eventSender.mouseScrollBy(0, -10);
} function repaintTest() {
window.addEventListener("load", runRepaintAndPixelTest, false); // Now scroll the #innerDiv once to the green area.
</script> innerDiv.scrollTop = 406;
</head> }
<body> </script>
<!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element being scrolled off page using javascript. --> <!-- https://bugs.webkit.org/show_bug.cgi?id=71550 -->
<!-- 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: auto;" id="outerDiv"> <div style="height: 300px; overflow-y: auto;" id="outerDiv">
<div style="height: 300px; background: purple;"></div> <div style="height: 300px; background: purple;"></div>
...@@ -23,17 +23,3 @@ ...@@ -23,17 +23,3 @@
</table> </table>
</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>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
[1, 0, 0, 0], [1, 0, 0, 0],
[0, 1, 0, 0], [0, 1, 0, 0],
[0, 0, 1, 0], [0, 0, 1, 0],
[0, -320, 0, 1] [0, -300, 0, 1]
] ]
}, },
{ {
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
[1, 0, 0, 0], [1, 0, 0, 0],
[0, 1, 0, 0], [0, 1, 0, 0],
[0, 0, 1, 0], [0, 0, 1, 0],
[0, -400, 0, 1] [0, -406, 0, 1]
] ]
} }
] ]
......
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