summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html')
-rw-r--r--testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html b/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html
new file mode 100644
index 0000000000..5a59a9556d
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-display.tentative.html
@@ -0,0 +1,57 @@
+<!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, hide the popover, and start the transition.
+ const popover = document.querySelector('[popover]');
+ popover.showPopover();
+ popover.getAnimations()[0].finish();
+ if (getComputedStyle(popover).left != "200px")
+ popover.remove();
+ popover.hidePopover();
+ document.getAnimations()[0].ready.then(() => {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ // Take a screenshot now.
+ document.documentElement.classList.remove('reftest-wait');
+ });
+ });
+ });
+ });
+ });
+}
+</script>