diff options
Diffstat (limited to 'testing/web-platform/tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html')
-rw-r--r-- | testing/web-platform/tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html b/testing/web-platform/tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html new file mode 100644 index 0000000000..dd244e137b --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<style> + #outer { view-timeline-attachment: defer; } + #target { view-timeline-attachment: ancestor; } +</style> +<div id="outer"> + <div id="target"></div> +</div> +<script> +test_computed_value('view-timeline-attachment', 'initial', 'local'); +test_computed_value('view-timeline-attachment', 'inherit', 'defer'); +test_computed_value('view-timeline-attachment', 'unset', 'local'); +test_computed_value('view-timeline-attachment', 'revert', 'local'); +test_computed_value('view-timeline-attachment', 'local'); +test_computed_value('view-timeline-attachment', 'defer'); +test_computed_value('view-timeline-attachment', 'ancestor'); +test_computed_value('view-timeline-attachment', 'local, defer'); +test_computed_value('view-timeline-attachment', 'defer, ancestor'); +test_computed_value('view-timeline-attachment', 'local, defer, ancestor'); +test_computed_value('view-timeline-attachment', 'local, local, local, local'); + +test(() => { + let style = getComputedStyle(document.getElementById('target')); + assert_not_equals(Array.from(style).indexOf('view-timeline-attachment'), -1); +}, 'The view-timeline-attachment property shows up in CSSStyleDeclaration enumeration'); + +test(() => { + let style = document.getElementById('target').style; + assert_not_equals(style.cssText.indexOf('view-timeline-attachment'), -1); +}, 'The view-timeline-attachment property shows up in CSSStyleDeclaration.cssText'); + +</script> |