Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt (254792 => 254793)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt 2020-01-18 07:09:31 UTC (rev 254792)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt 2020-01-18 07:21:53 UTC (rev 254793)
@@ -7,13 +7,13 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Select did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Select did not receive wheel events.
(GraphicsLayer
(anchor 0.00 0.00)
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(visible rect 0.00, 70.00 785.00 x 585.00)
(coverage rect 0.00, 70.00 785.00 x 585.00)
(intersects coverage rect 1)
@@ -20,7 +20,7 @@
(contentsScale 1.00)
(children 1
(GraphicsLayer
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(contentsOpaque 1)
(visible rect 0.00, 70.00 785.00 x 585.00)
(coverage rect 0.00, 0.00 1570.00 x 1755.00)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html (254792 => 254793)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html 2020-01-18 07:09:31 UTC (rev 254792)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html 2020-01-18 07:21:53 UTC (rev 254793)
@@ -6,116 +6,96 @@
width: 680px;
}
-.table td, .table th {
- padding: 2px;
-}
-
-.table th {
- height: 20px;
- text-align: left;
- font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
+.scrollable_select option:nth-child(odd) {
background: #f3f3f3;
}
-.scrollable_select option:nth-child(odd) {
- background: #f3f3f3;
+pre {
+ max-height: 200px;
+ max-width: 200px;
}
-
</style>
<script src=""
<script>
-var wheelCount = 0;
-function onScrollWheel(evt) {
- wheelCount = wheelCount + 1;
-}
+ window.jsTestIsAsync = true;
-function onLoad() {
- document.addEventListener("mousewheel", onScrollWheel);
- window.addEventListener("scroll", onPageScroll);
- setupTopLevel();
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ var selectTarget;
+ var pageScrollPositionBefore;
+ var selectScrollPositionBefore;
-var selectTarget;
-var pageScrollPositionBefore;
-var selectScrollPositionBefore;
-var continueCount = 5;
+ function onPageScroll()
+ {
+ if (document.scrollingElement.scrollTop >= 70)
+ checkForScroll();
+ }
-function onPageScroll()
-{
- if (document.scrollingElement.scrollTop >= 70)
- checkForScroll();
-}
+ function checkForScroll()
+ {
+ // The select should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var selectScrollPositionAfter = selectTarget.scrollTop;
-function checkForScroll()
-{
- // The select should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var selectScrollPositionAfter = selectTarget.scrollTop;
+ if (selectScrollPositionBefore != selectScrollPositionAfter)
+ testFailed("Select consumed wheel events.");
+ else
+ testPassed("Select did not receive wheel events.");
- if (selectScrollPositionBefore != selectScrollPositionAfter)
- testFailed("Select consumed wheel events.");
- else
- testPassed("Select did not receive wheel events.");
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ selectTarget = document.getElementById('target');
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ selectScrollPositionBefore = selectTarget.scrollTop;
- selectTarget = document.getElementById('target');
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(selectTarget.offsetLeft) + 20;
+ var startPosY = Math.round(selectTarget.offsetTop) - 42;
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
- selectScrollPositionBefore = selectTarget.scrollTop;
+ // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(selectTarget.offsetLeft) + 20;
- var startPosY = Math.round(selectTarget.offsetTop) - 42;
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
+ function setupTest()
+ {
+ window.addEventListener("scroll", onPageScroll);
- // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-}
+ if (window.eventSender) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down<br/>"
- + "past the selectTarget.<br/><br/>"
- + "You should not see the 'content21' label if this test is successful.</p>";
- messageLocation.appendChild(message);
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down<br/>"
+ + "past the selectTarget.<br/><br/>"
+ + "You should not see the 'content21' label if this test is successful.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
-
+
+ window.addEventListener('load', setupTest, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="source" style="height: 100px; width: 500px;">
Put mouse here and flick downwards