diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-anchor-position/position-fallback-basics.html')
-rw-r--r-- | testing/web-platform/tests/css/css-anchor-position/position-fallback-basics.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-anchor-position/position-fallback-basics.html b/testing/web-platform/tests/css/css-anchor-position/position-fallback-basics.html new file mode 100644 index 0000000000..bfeb921de1 --- /dev/null +++ b/testing/web-platform/tests/css/css-anchor-position/position-fallback-basics.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Tests basics of the 'position-fallback' property</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#propdef-position-fallback"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<script src="/css/support/inheritance-testcommon.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<div id="container"> + <div id="target"></div> +</div> + +<script> +// position-fallback: none | <dashed-ident> +test_valid_value('position-fallback', 'none'); +test_valid_value('position-fallback', '--foo'); +test_invalid_value('position-fallback', 'foo-bar'); +test_invalid_value('position-fallback', '--foo --bar') +test_invalid_value('position-fallback', '--foo, --bar') +test_invalid_value('position-fallback', '100px'); +test_invalid_value('position-fallback', '100%'); + +// Computed value: as specified +test_computed_value('position-fallback', 'none'); +test_computed_value('position-fallback', '--foo'); + +// Initial: none +// Inherited: no +assert_not_inherited('position-fallback', 'none', '--foo'); + +// Animation type: discrete +test_no_interpolation({ + property: 'position-fallback', + from: '--foo', + to: 'none', +}); +</script> |