mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
Tests: Resync imported WPT tests
This commit is contained in:
committed by
Shannon Booth
parent
dda3cb99b7
commit
504a8e6d1d
Notes:
github-actions[bot]
2026-04-04 21:38:15 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/504a8e6d1d3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8776 Reviewed-by: https://github.com/shannonbooth ✅
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user