diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-view-transitions/new-content-from-root-display-none.html')
-rw-r--r-- | testing/web-platform/tests/css/css-view-transitions/new-content-from-root-display-none.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-view-transitions/new-content-from-root-display-none.html b/testing/web-platform/tests/css/css-view-transitions/new-content-from-root-display-none.html new file mode 100644 index 0000000000..4d2ad28b17 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/new-content-from-root-display-none.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html class=reftest-wait style="display: none"> +<title>View transitions: capture starts with root being display none</title> +<link rel="help" href="https://github.com/WICG/view-transitions"> +<link rel="author" href="mailto:vmpstr@chromium.org"> +<link rel="match" href="new-content-from-root-display-none-ref.html"> +<script src="/common/reftest-wait.js"></script> +<style> +.tb { writing-mode: horizontal-tb; } +.lr { writing-mode: vertical-lr; } +.rl { writing-mode: vertical-rl; } +.shared { + margin: 2px; + width: 100px; + height: 50px; + background: green; + contain: paint; + border: 1px solid black; +} + +html::view-transition-group(root) { animation-duration: 500s; } +html::view-transition-new(root) { + animation: unset; + opacity: 1; +} +html::view-transition-old(root) { + animation: unset; + opacity: 0; +} + +</style> + +<div class=tb><div id=one class=shared>T</div></div> +<div class=lr><div id=two class=shared>T</div></div> +<div class=rl><div id=three class=shared>T</div></div> + +<script> +failIfNot(document.startViewTransition, "Missing document.startViewTransition"); + +async function runTest() { + let transition = document.startViewTransition(() => { + document.documentElement.style = ""; + }); + transition.ready.then(() => requestAnimationFrame(takeScreenshot)); +} +onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); +</script> + + |