forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start tests with 'tentative' Also, scroll-start-with-text-fragment-navigation.html is adjusted to the new scroll-start directory added in crrev.com/c/4628128. Bug: 1439807 Change-Id: Idfa8b0dd447bb621d0261780e3b6b93b9f952e82 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4629866 Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: David Awogbemila <awogbemila@chromium.org> Cr-Commit-Position: refs/heads/main@{#1161712} -- wpt-commits: 9f1dfeb0175b413db001ca619b0711efeada930b wpt-pr: 40656
30 lines
No EOL
1.1 KiB
HTML
30 lines
No EOL
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title> CSS Scroll Snap 2 Test: scroll-start interaction with fragment-navigation</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<iframe id="frame" src="scroll-start-with-fragment-navigation-inner-frame.html#fragment_target"
|
|
onload="runTest()"></iframe>
|
|
<script>
|
|
function runTest() {
|
|
test((t) => {
|
|
let scroller = frame.contentDocument.scrollingElement;
|
|
// fragment_target is at the bottom of the frame so the frame should be
|
|
// fully scrolled down to bring it into view.
|
|
let expected_scroll_top = scroller.scrollHeight - scroller.clientHeight;
|
|
|
|
assert_equals(frame.contentWindow.location.hash, "#fragment_target");
|
|
assert_not_equals(100, expected_scroll_top);
|
|
assert_equals(frame.contentDocument.scrollingElement.scrollTop,
|
|
expected_scroll_top);
|
|
}, "scroll-start does not override hash fragment navigation");
|
|
}
|
|
</script>
|
|
</body> |