diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html')
-rw-r--r-- | testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html b/testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html new file mode 100644 index 0000000000..783cb539cc --- /dev/null +++ b/testing/web-platform/tests/css/css-anchor-position/anchor-default-basics.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<title>Tests basics of the 'anchor-default' property</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#propdef-anchor-default"> +<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> +// anchor-default: <anchor-element> +// <anchor-element> = implicit | <dashed-ident> +test_valid_value('anchor-default', 'implicit'); +test_valid_value('anchor-default', '--foo'); +test_invalid_value('anchor-default', 'none'); +test_invalid_value('anchor-default', 'foo-bar'); +test_invalid_value('anchor-default', '--foo --bar') +test_invalid_value('anchor-default', '--foo, --bar') +test_invalid_value('anchor-default', '100px'); +test_invalid_value('anchor-default', '100%'); + +// Computed value: as specified +test_computed_value('anchor-default', 'implicit'); +test_computed_value('anchor-default', '--foo'); + +// Initial: implicit +// Inherited: no +assert_not_inherited('anchor-default', 'implicit', '--foo'); + +// Animation type: discrete +test_no_interpolation({ + property: 'anchor-default', + from: '--foo', + to: 'implicit', +}); +</script> |