diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-scrolled-element.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-scrolled-element.html
deleted file mode 100644
index 73433969422..00000000000
--- a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-scrolled-element.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-window.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-window.html
index ef72f56d2ba..d2fd6f4d315 100644
--- a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-window.html
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fired-to-window.html
@@ -7,49 +7,63 @@
-
-
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html
new file mode 100644
index 00000000000..99a281480ff
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html
new file mode 100644
index 00000000000..115e583c067
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html
new file mode 100644
index 00000000000..9cd3b421fe9
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-for-user-scroll.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-for-user-scroll.html
index 5146c5f719a..a06843a35e7 100644
--- a/test/fixtures/wpt/dom/events/scrolling/scrollend-event-for-user-scroll.html
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-event-for-user-scroll.html
@@ -8,6 +8,7 @@
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-fires-to-text-input.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-fires-to-text-input.html
new file mode 100644
index 00000000000..edc75d91217
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-fires-to-text-input.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-user-scroll-common.js b/test/fixtures/wpt/dom/events/scrolling/scrollend-user-scroll-common.js
new file mode 100644
index 00000000000..1b637233882
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-user-scroll-common.js
@@ -0,0 +1,150 @@
+
+async function test_scrollend_on_touch_drag(t, target_div) {
+ // Skip the test on a Mac as they do not support touch screens.
+ const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
+ if (isMac)
+ return;
+
+ await resetTargetScrollState(t, target_div);
+ await waitForCompositorReady();
+
+ const targetScrollendPromise = waitForScrollendEventNoTimeout(target_div);
+ verifyNoScrollendOnDocument(t);
+
+ let scrollend_count = 0;
+ const scrollend_listener = () => {
+ scrollend_count += 1;
+ };
+ target_div.addEventListener("scrollend", scrollend_listener);
+ t.add_cleanup(() => {
+ target_div.removeEventListener('scrollend', scrollend_listener);
+ });
+
+ // Perform a touch drag on target div and wait for target_div to get
+ // a scrollend event.
+ await new test_driver.Actions()
+ .addPointer('TestPointer', 'touch')
+ .pointerMove(0, 0, { origin: target_div }) // 0, 0 is center of element.
+ .pointerDown()
+ .addTick()
+ .pointerMove(0, -40, { origin: target_div }) // Drag up to move down.
+ .addTick()
+ .pause(200) // Prevent inertial scroll.
+ .pointerMove(0, -60, { origin: target_div })
+ .addTick()
+ .pause(200) // Prevent inertial scroll.
+ .pointerUp()
+ .send();
+
+ await targetScrollendPromise;
+
+ assert_true(target_div.scrollTop > 0);
+ await verifyScrollStopped(t, target_div);
+ assert_equals(scrollend_count, 1);
+}
+
+async function test_scrollend_on_scrollbar_gutter_click(t, target_div) {
+ // Skip test on platforms that do not have a visible scrollbar (e.g.
+ // overlay scrollbar).
+ const scrollbar_width = target_div.offsetWidth - target_div.clientWidth;
+ if (scrollbar_width == 0)
+ return;
+
+ await resetTargetScrollState(t, target_div);
+ await waitForCompositorReady();
+
+ const targetScrollendPromise = waitForScrollendEventNoTimeout(target_div);
+ verifyNoScrollendOnDocument(t);
+
+ const bounds = target_div.getBoundingClientRect();
+ // Some versions of webdriver have been known to frown at non-int arguments
+ // to pointerMove.
+ const x = Math.round(bounds.right - scrollbar_width / 2);
+ const y = Math.round(bounds.bottom - 20);
+ await new test_driver.Actions()
+ .addPointer('TestPointer', 'mouse')
+ .pointerMove(x, y, { origin: 'viewport' })
+ .pointerDown()
+ .addTick()
+ .pointerUp()
+ .send();
+
+ await targetScrollendPromise;
+ assert_true(target_div.scrollTop > 0);
+ await verifyScrollStopped(t, target_div);
+}
+
+// Same issue as previous test.
+async function test_scrollend_on_scrollbar_thumb_drag(t, target_div) {
+ // Skip test on platforms that do not have a visible scrollbar (e.g.
+ // overlay scrollbar).
+ const scrollbar_width = target_div.offsetWidth - target_div.clientWidth;
+ if (scrollbar_width == 0)
+ return;
+
+ await resetTargetScrollState(t, target_div);
+ await waitForCompositorReady();
+
+ const targetScrollendPromise = waitForScrollendEventNoTimeout(target_div);
+ verifyNoScrollendOnDocument(t);
+
+ const bounds = target_div.getBoundingClientRect();
+ // Some versions of webdriver have been known to frown at non-int arguments
+ // to pointerMove.
+ const x = Math.round(bounds.right - scrollbar_width / 2);
+ const y = Math.round(bounds.top + 30);
+ const dy = 30;
+ await new test_driver.Actions()
+ .addPointer('TestPointer', 'mouse')
+ .pointerMove(x, y, { origin: 'viewport' })
+ .pointerDown()
+ .pointerMove(x, y + dy, { origin: 'viewport' })
+ .addTick()
+ .pointerUp()
+ .send();
+
+ await targetScrollendPromise;
+ assert_true(target_div.scrollTop > 0);
+ await verifyScrollStopped(t, target_div);
+}
+
+async function test_scrollend_on_mousewheel_scroll(t, target_div, frame) {
+ await resetTargetScrollState(t, target_div);
+ await waitForCompositorReady();
+
+ const targetScrollendPromise = waitForScrollendEventNoTimeout(target_div);
+ verifyNoScrollendOnDocument(t);
+
+ let scroll_origin = target_div;
+ if (frame) {
+ // chromedriver doesn't support passing { origin: element }
+ // for an element within a subframe. Use the frame element itself.
+ scroll_origin = frame;
+ }
+ const x = 0;
+ const y = 0;
+ const dx = 0;
+ const dy = 40;
+ await new test_driver.Actions()
+ .scroll(x, y, dx, dy, { origin: scroll_origin })
+ .send();
+
+ await targetScrollendPromise;
+ assert_true(target_div.scrollTop > 0);
+ await verifyScrollStopped(t, target_div);
+}
+
+async function test_scrollend_on_keyboard_scroll(t, target_div) {
+ await resetTargetScrollState(t, target_div);
+ await waitForCompositorReady();
+
+ verifyNoScrollendOnDocument(t);
+ const targetScrollendPromise = waitForScrollendEventNoTimeout(target_div);
+
+ target_div.focus();
+ window.test_driver.send_keys(target_div, '\ue015');
+
+ await targetScrollendPromise;
+ assert_true(target_div.scrollTop > 0);
+ await verifyScrollStopped(t, target_div);
+}
diff --git a/test/fixtures/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html b/test/fixtures/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html
new file mode 100644
index 00000000000..d1f50304add
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-basic.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-basic.html
new file mode 100644
index 00000000000..1b9df69ec77
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-basic.html
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-multiple-action-chains.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-multiple-action-chains.html
new file mode 100644
index 00000000000..3b46b2f99a9
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-multiple-action-chains.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-display-change.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-display-change.html
new file mode 100644
index 00000000000..6ca3c78b74c
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-display-change.html
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-elements.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-elements.html
new file mode 100644
index 00000000000..0109b7b6b18
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-elements.html
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
X
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-move.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-move.html
new file mode 100644
index 00000000000..a739d1cd547
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-move.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-removal.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-removal.html
new file mode 100644
index 00000000000..f81efd22e22
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-removal.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-resize.html b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-resize.html
new file mode 100644
index 00000000000..eb7431fca47
--- /dev/null
+++ b/test/fixtures/wpt/dom/events/scrolling/wheel-event-transactions-target-resize.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json
index e55319b6033..3edb1453e74 100644
--- a/test/fixtures/wpt/versions.json
+++ b/test/fixtures/wpt/versions.json
@@ -16,7 +16,7 @@
"path": "dom/abort"
},
"dom/events": {
- "commit": "ab8999891c6225bef1741c2960033aad620481a8",
+ "commit": "0a811c51619b14f78fec60ba7dd1603795ca6a21",
"path": "dom/events"
},
"encoding": {