gecko-dev/testing/web-platform/tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-computed.html
Eric Willigers a37a32e1f3 Bug 1576838 [wpt PR 18687] - CSS: Consolidate block/inline tests for scroll-margin, scroll-padding, a=testonly
Automatic update from web-platform-tests
CSS: Consolidate block/inline tests for scroll-margin, scroll-padding

Tests for scroll-padding-inline-start, scroll-padding-block-start,
scroll-padding-inline-end, scroll-padding-block-end now appear
together.

Tests for scroll-margin-block-start, scroll-margin-inline-start,
scroll-margin-block-end, scroll-margin-inline-end now appear
together.

Added tests that calc(auto) is rejected.

Change-Id: I06759db50dd21e2654df494255a4e41233cdcae6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771486
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690905}

--

wpt-commits: b690813a7231b0891fed00e7397b441b58ef0cb8
wpt-pr: 18687
2019-09-03 14:23:04 +00:00

42 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Scroll Snap: getComputedStyle().scrollMarginBlock / scrollMarginInline</title>
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#margin-longhands-logical">
<meta name="assert" content="scroll-margin-block, scroll-margin-inline computed value is absolute length.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
test_computed_value("scroll-margin-block-start", "10px");
test_computed_value("scroll-margin-block-start", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-block-end", "10px");
test_computed_value("scroll-margin-block-end", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-inline-start", "10px");
test_computed_value("scroll-margin-inline-start", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-inline-end", "10px");
test_computed_value("scroll-margin-inline-end", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-block", "10px");
test_computed_value("scroll-margin-block", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-block", "1px 2px");
test_computed_value("scroll-margin-inline", "10px");
test_computed_value("scroll-margin-inline", "calc(10px - 0.5em)", "-10px");
test_computed_value("scroll-margin-inline", "1px 2px");
</script>
</body>
</html>