diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /dom/xhr/tests/test_bug1788125.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/xhr/tests/test_bug1788125.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/dom/xhr/tests/test_bug1788125.html b/dom/xhr/tests/test_bug1788125.html new file mode 100644 index 0000000000..44cb79864c --- /dev/null +++ b/dom/xhr/tests/test_bug1788125.html @@ -0,0 +1,59 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title><!-- TODO: insert title here --></title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" href="/tests/SimpleTest/test.css"/> + <style> + #anim { + width: 100px; + height: 100px; + background: red; + position: relative; + animation: mymove 1s 1; + animation-iteration-count: infinite; + } + + @keyframes mymove { + from {left: 0px;} + to {left: 200px;} + } + </style> + <script> + SimpleTest.waitForExplicitFinish(); + + var animCount = 0; + var didRunXHR = false; + + async function start() { + await SpecialPowers.pushPrefEnv({"set": [["layout.skip_ticks_while_page_suspended", true]]}); + + window.addEventListener("animationiteration", function l() { + ++animCount; + info(animCount); + if (didRunXHR) { + window.removeEventListener("animationiteration", l); + document.getElementById("anim").id = ""; + SimpleTest.finish(); + } + }); + + let startCount = animCount; + let xhr = new XMLHttpRequest(); + xhr.open("GET", "slow.sjs", false); + xhr.send(null); + didRunXHR = true; + is(animCount, startCount, "Shouldn't have triggered animation events during the sync XHRs"); + } + + + </script> +</head> +<body onload="start()"> +<div id="anim"></div> +<p id="display"></p> +<div id="content" style="display: none"></div> +<pre id="test"></pre> +</body> +</html> |