summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html')
-rw-r--r--testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html b/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html
new file mode 100644
index 0000000000..79e0b4dcbf
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/popovers/popover-animated-hide-finishes.tentative.html
@@ -0,0 +1,56 @@
+<!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-hide-finishes-ref.tentative.html">
+
+<div popover>This is a popover</div>
+<div class=topmost></div>
+
+<style>
+ [popover] {
+ width: 100px;
+ height: 100px;
+ margin: 1em;
+ left: 0;
+ /* Immediate transition: */
+ transition: left 1s -1s;
+ }
+ [popover]:open {
+ left: 200px;
+ }
+ [popover]::backdrop {
+ background-color: red;
+ }
+ .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 hide transition,
+ // which should immediately finish.
+ document.querySelector('[popover]').showPopover();
+ document.querySelector('[popover]').hidePopover();
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ // Take a screenshot now.
+ document.documentElement.classList.remove('reftest-wait');
+ });
+ });
+ });
+ });
+}
+</script>