diff options
Diffstat (limited to 'testing/web-platform/tests/scroll-animations/css/animation-timeline-parsing.html')
-rw-r--r-- | testing/web-platform/tests/scroll-animations/css/animation-timeline-parsing.html | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/testing/web-platform/tests/scroll-animations/css/animation-timeline-parsing.html b/testing/web-platform/tests/scroll-animations/css/animation-timeline-parsing.html new file mode 100644 index 0000000000..1a30f11f85 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/css/animation-timeline-parsing.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#animation-timeline"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<div id="target"></div> +<script> +test_valid_value('animation-timeline', 'initial'); +test_valid_value('animation-timeline', 'inherit'); +test_valid_value('animation-timeline', 'unset'); +test_valid_value('animation-timeline', 'revert'); +test_valid_value('animation-timeline', 'auto'); +test_valid_value('animation-timeline', 'none'); +test_valid_value('animation-timeline', 'auto, auto'); +test_valid_value('animation-timeline', 'none, none'); +test_valid_value('animation-timeline', 'auto, none'); +test_valid_value('animation-timeline', 'none, auto'); +test_valid_value('animation-timeline', '"test"', ["test", '"test"']); +test_valid_value('animation-timeline', '"none"'); +test_valid_value('animation-timeline', '"auto"'); +test_valid_value('animation-timeline', '"initial"'); +test_valid_value('animation-timeline', '"inherit"'); +test_valid_value('animation-timeline', '"unset"'); +test_valid_value('animation-timeline', '"revert"'); +test_valid_value('animation-timeline', 'test'); +test_valid_value('animation-timeline', 'test1, test2'); +test_valid_value('animation-timeline', 'test1, "test2", none, test3, auto', ["test1, test2, none, test3, auto", 'test1, "test2", none, test3, auto']); + +test_invalid_value('animation-timeline', '10px'); +test_invalid_value('animation-timeline', 'auto auto'); +test_invalid_value('animation-timeline', 'none none'); +test_invalid_value('animation-timeline', 'foo bar'); +test_invalid_value('animation-timeline', '"foo" "bar"'); +test_invalid_value('animation-timeline', 'rgb(1, 2, 3)'); +test_invalid_value('animation-timeline', '#fefefe'); + +// https://drafts.csswg.org/scroll-animations-1/#scroll-notation +// +// animation-timeline: scroll(<axis>? <scroller>?); +// <axis> = block | inline | vertical | horizontal +// <scroller> = root | nearest +test_valid_value('animation-timeline', 'scroll()'); +test_valid_value('animation-timeline', 'scroll(block)', 'scroll()'); +test_valid_value('animation-timeline', 'scroll(inline)'); +test_valid_value('animation-timeline', 'scroll(horizontal)'); +test_valid_value('animation-timeline', 'scroll(vertical)'); +test_valid_value('animation-timeline', 'scroll(root)'); +test_valid_value('animation-timeline', 'scroll(nearest)', 'scroll()'); +test_valid_value('animation-timeline', 'scroll(inline nearest)', 'scroll(inline)'); +test_valid_value('animation-timeline', 'scroll(vertical root)'); + +test_invalid_value('animation-timeline', 'scroll(root block)'); +test_invalid_value('animation-timeline', 'scroll(abc root)'); +test_invalid_value('animation-timeline', 'scroll(abc)'); +test_invalid_value('animation-timeline', 'scroll(vertical abc)'); +test_invalid_value('animation-timeline', 'scroll("string")'); + +// https://drafts.csswg.org/scroll-animations-1/#view-notation +test_valid_value('animation-timeline', 'view()'); +test_valid_value('animation-timeline', 'view(block)', 'view()'); +test_valid_value('animation-timeline', 'view(inline)'); +test_valid_value('animation-timeline', 'view(horizontal)'); +test_valid_value('animation-timeline', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical 1px 2px)'); +test_valid_value('animation-timeline', 'view(vertical 1px)'); +test_valid_value('animation-timeline', 'view(vertical auto)', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical auto auto)', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical auto 1px)'); +test_valid_value('animation-timeline', 'view(1px 2px vertical)', 'view(vertical 1px 2px)'); +test_valid_value('animation-timeline', 'view(1px vertical)', 'view(vertical 1px)'); +test_valid_value('animation-timeline', 'view(auto horizontal)', 'view(horizontal)'); +test_valid_value('animation-timeline', 'view(1px 2px)'); +test_valid_value('animation-timeline', 'view(1px)'); +test_valid_value('animation-timeline', 'view(1px 1px)', 'view(1px)'); +test_valid_value('animation-timeline', 'view(1px auto)'); +test_valid_value('animation-timeline', 'view(auto calc(1% + 1px))'); +test_valid_value('animation-timeline', 'view(auto)', 'view()'); +test_valid_value('animation-timeline', 'view(auto auto)', 'view()'); + +test_invalid_value('animation-timeline', 'view(vertical 1px 2px 3px)'); +test_invalid_value('animation-timeline', 'view(1px vertical 3px)'); +test_invalid_value('animation-timeline', 'view(1px 2px 3px)'); +test_invalid_value('animation-timeline', 'view(abc block)'); +test_invalid_value('animation-timeline', 'view(abc)'); +test_invalid_value('animation-timeline', 'view(vertical abc)'); +test_invalid_value('animation-timeline', 'view("string")'); +</script> |