diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/popovers/popover-animated-show-display.tentative.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/popovers/popover-animated-show-display.tentative.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-animated-show-display.tentative.html b/testing/web-platform/tests/html/semantics/popovers/popover-animated-show-display.tentative.html new file mode 100644 index 0000000000..f78d8e1236 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popovers/popover-animated-show-display.tentative.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<link rel=author href="mailto:masonf@chromium.org"> +<link rel=help href="https://open-ui.org/components/popup.research.explainer"> +<link rel=match href="popover-animated-display-ref.tentative.html"> + +<div popover>This is a popover</div> +<div class=topmost></div> + +<style> + [popover] { + width: 100px; + height: 100px; + margin: 1em; + left: 0; + transition: left 20s steps(2, jump-end) -10s; + } + [popover]:open { + left: 200px; + } + .topmost { + position:fixed; + z-index: 999999; + top:0; + left:0; + width:1000px; + height:1000px; + background:green; + margin:0; + padding:0; + } +</style> + +<script> +window.onload = () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + // This will show the popover, and start the transition. + document.querySelector('[popover]').showPopover(); + document.getAnimations()[0].ready.then(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + // Take a screenshot now. + document.documentElement.classList.remove('reftest-wait'); + }); + }); + }); + }); + }); +} +</script> |