Tests: Resync imported WPT tests

This commit is contained in:
Tim Ledbetter
2026-04-04 17:18:58 +01:00
committed by Shannon Booth
parent dda3cb99b7
commit 504a8e6d1d
Notes: github-actions[bot] 2026-04-04 21:38:15 +00:00
306 changed files with 6274 additions and 2460 deletions

View File

@@ -68,27 +68,31 @@
</div>
</body>
<script>
test(() => { assert_equals(normalChild.scrollParent, scroller1); },
test(() => { assert_equals(normalChild.scrollParent(), scroller1); },
"scrollParent returns the nearest scroll container.");
test(() => { assert_equals(childOfHidden.scrollParent, hidden); },
test(() => { assert_equals(childOfHidden.scrollParent(), hidden); },
"hidden element is a scroll container.");
test(() => { assert_equals(noBox.scrollParent, null); },
test(() => { assert_equals(noBox.scrollParent(), null); },
"Element with no box has null scrollParent.");
test(() => { assert_equals(absPosChild.scrollParent, scroller2); },
test(() => { assert_equals(absPosChild.scrollParent(), scroller2); },
"scrollParent follows absolute positioned containing block chain.");
test(() => { assert_equals(fixedPosChild.scrollParent, scroller3); },
test(() => { assert_equals(fixedPosChild.scrollParent(), scroller3); },
"scrollParent follows fixed positioned containing block chain.");
test(() => { assert_equals(fixedToRoot.scrollParent, null); },
test(() => { assert_equals(fixedToRoot.scrollParent(), null); },
"scrollParent of element fixed to root is null.");
test(() => { assert_equals(childOfRoot.scrollParent, document.scrollingElement); },
test(() => { assert_equals(childOfRoot.scrollParent(), document.scrollingElement); },
"scrollParent of child in root viewport returns document scrolling element.");
test(() => { assert_equals(fixedContainedByRoot.scrollParent, document.scrollingElement); },
test(() => { assert_equals(fixedContainedByRoot.scrollParent(), document.scrollingElement); },
"scrollParent of fixed element contained within root is document scrolling element.");
test(() => { assert_equals(document.body.scrollParent, null); },
"scrollParent of body is null.");
test(() => { assert_equals(document.documentElement.scrollParent, null); },
test(() => {
assert_not_equals(document.body, document.scrollingElement);
assert_equals(document.body.scrollParent(), document.scrollingElement);
}, "scrollParent of body is document scrolling element when body is not document scrolling element.");
test(() => { assert_equals(document.documentElement.scrollParent(), null); },
"scrollParent of root is null.");
test(() => { assert_equals(childOfDisplayContents.scrollParent, scroller1); },
test(() => { assert_equals(childOfDisplayContents.scrollParent(), scroller1); },
"scrollParent skips ancestors with `display: contents`.");
test(() => { assert_equals(document.scrollingElement.scrollParent(), null); },
"scrollParent of scrolling element is null.");
</script>
</html>