Runs: Chrome 160.0.8195.0 (wpt@1ab8957e4, 2026-12-01) | Firefox 163.0a1 (wpt@1ab8957e4, 2026-12-01) | Safari 257 preview (wpt@13099faa1, 2026-12-02) | Ladybird 1.0-cbbd8 (wpt@95eb658dc, 2026-12-02) | Servo Servo 0.8 (wpt@75c11f957, 2026-12-01) | Blitz af350c0af (wpt@705f393a6, 2026-12-02)
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 1/1 | 1/1 | 1/1 | 1/1 | 0/1 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| Tests scrollend event for calling scrollBy with behavior 'smooth' on root. | PASS | PASS | PASS | PASS | FAIL | — |
/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll.html
<!DOCTYPE HTML> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/subset-tests-by-key.js"></script> <meta name="variant" content="?include=subframe-scrollTo-auto"/> <meta name="variant" content="?include=subframe-scrollTo-smooth"/> <meta name="variant" content="?include=subframe-scrollBy-auto"/> <meta name="variant" content="?include=subframe-scrollBy-smooth"/> <meta name="variant" content="?include=root-scrollTo-auto"/> <meta name="variant" content="?include=root-scrollTo-smooth"/> <meta name="variant" content="?include=root-scrollBy-auto"/> <meta name="variant" content="?include=root-scrollBy-smooth"/> <script src="scroll_support.js"></script> <style> html { height: 3000px; width: 3000px; } #targetDiv { width: 200px; height: 200px; overflow: scroll; } #innerDiv { width: 400px; height: 400px; } </style> <body style="margin:0" onload=runTest()> <div id="targetDiv"> <div id="innerDiv"> </div> </div> </body> <script> let invalid_scrollend_arrived = false; function onInvalidScrollEnd(event) { invalid_scrollend_arrived = true; } let scroll_fn_variants = [ { key: "subframe-scrollTo-auto", target: targetDiv, fn: "scrollTo", behavior: "auto", title: "Tests scrollend event for calling scrollTo with behavior 'auto' on subframe." }, { key: "subframe-scrollTo-smooth", target: targetDiv, fn: "scrollTo", behavior: "smooth", title: "Tests scrollend event for calling scrollTo with behavior 'smooth' on subframe." }, { key: "subframe-scrollBy-auto", target: targetDiv, fn: "scrollBy", behavior: "auto", title: "Tests scrollend event for calling scrollBy with behavior 'auto' on subframe." }, { key: "subframe-scrollBy-smooth", target: targetDiv, fn: "scrollBy", behavior: "smooth", title: "Tests scrollend event for calling scrollBy with behavior 'smooth' on subframe." }, { key: "root-scrollTo-auto", target: document.scrollingElement, fn: "scrollTo", behavior: "auto", title: "Tests scrollend event for calling scrollTo with behavior 'auto' on root." }, { key: "root-scrollTo-smooth", target: document.scrollingElement, fn: "scrollTo", behavior: "smooth", title: "Tests scrollend event for calling scrollTo with behavior 'smooth' on root." }, { key: "root-scrollBy-auto", target: document.scrollingElement, fn: "scrollBy", behavior: "auto", title: "Tests scrollend event for calling scrollBy with behavior 'auto' on root." }, { key: "root-scrollBy-smooth", target: document.scrollingElement, fn: "scrollBy", behavior: "smooth", title: "Tests scrollend event for calling scrollBy with behavior 'smooth' on root." }, ]; function runTest() { async function testScrollFn(testInfo, t) { await waitForCompositorCommit(); let scrollendPromise = null; if (testInfo.target == document.scrollingElement) { targetDiv.addEventListener("scrollend", onInvalidScrollEnd); scrollendPromise = createScrollendPromiseForTarget(t, document, 2000, true); } else { document.addEventListener("scrollend", onInvalidScrollEnd); scrollendPromise = createScrollendPromiseForTarget(t, targetDiv, 2000, false); } testInfo.target[testInfo.fn]({ top: 200, left: 200, behavior: testInfo.behavior }); await scrollendPromise; assert_false(invalid_scrollend_arrived, "Scrollend should not fire to target that has not scrolled"); assert_equals(testInfo.target.scrollLeft, 200, testInfo.target.tagName + "." + testInfo.fn + " scrollLeft"); assert_equals(testInfo.target.scrollTop, 200, testInfo.target.tagName + "." + testInfo.fn + " scrollTop"); } scroll_fn_variants.forEach((testInfo) => { subsetTestByKey(testInfo.key, promise_test, async (t) => testScrollFn(testInfo, t), testInfo.title); }); } </script>