commit 3efdcde8226573ba50284befbe6b67b6f514be24
parent 4ed8fc1c5ce584ea1284b3fcd3fb52b3c7aef28a
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Wed, 19 Nov 2025 04:55:29 +0000
Bug 2000686 [wpt PR 56066] - Deflake anchored-transition-display-none-001.html, a=testonly
Automatic update from web-platform-tests
Deflake anchored-transition-display-none-001.html
Wait for an onload event before changing the display type, to make sure
that we actually get a transition.
Bug: 448608303
Change-Id: I7fa13f7c2cc8f3b1e5fb01393fcf92e312b4deb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7142120
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1546052}
--
wpt-commits: 15bc7c3677bb5c68b2e656c26c4bec6c4dd6b0fe
wpt-pr: 56066
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/testing/web-platform/tests/css/css-anchor-position/anchored-transition-display-none-001.html b/testing/web-platform/tests/css/css-anchor-position/anchored-transition-display-none-001.html
@@ -3,7 +3,7 @@
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1">
<link rel="match" href="anchored-transition-display-none-001-ref.html">
This is visible.
-<div>FAIL if this is visible</div>
+<div id="target">FAIL if this is visible</div>
<style>
div {
@@ -15,11 +15,13 @@ div {
}
</style>
<script>
+ // Make sure that everything is loaded before changing styles, to ensure
+ // that we actually get a transition.
+ window.onload = ()=> {
html.addEventListener('transitionend', () => {
- html.classList.toggle('reftest-wait')
+ html.classList.toggle('reftest-wait')
});
-
- document.body.offsetLeft;
- document.querySelector("div").style.display = "none";
+ target.style.display = "none";
+ }
</script>