diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /image/test/reftest/generic/1805599-1.html | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/test/reftest/generic/1805599-1.html')
-rw-r--r-- | image/test/reftest/generic/1805599-1.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/image/test/reftest/generic/1805599-1.html b/image/test/reftest/generic/1805599-1.html new file mode 100644 index 0000000000..ee5295dab5 --- /dev/null +++ b/image/test/reftest/generic/1805599-1.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html class="reftest-no-flush reftest-wait" reftest-no-sync-layers> +<!-- reftest-no-sync-layers so that the updateLayerTree call doesn't a sync decode paint which would hide the bug --> +<script> +async function loadimg() { + let theimg = document.createElement("img"); + document.body.appendChild(theimg); + theimg.src = "1805599-1.svg"; + let paintpromise = new Promise(resolve => { + window.addEventListener("MozAfterPaint", resolve, { once: true }); + }); + await theimg.decode(); + await paintpromise; + setTimeout(finish, 0); +} +async function waitForPendingPaints() { + while (SpecialPowers.wrap(window).windowUtils.isMozAfterPaintPending) { + await new Promise(resolve => { + window.addEventListener("MozAfterPaint", resolve, { once: true }); + }); + } +} +// we have to do this when we use reftest-no-sync-layers to make sure the rendering is up to date +async function finish() { + await waitForPendingPaints(); + await new Promise(resolve => requestAnimationFrame(resolve)); + await new Promise(resolve => requestAnimationFrame(resolve)); + await waitForPendingPaints(); + document.documentElement.className = ""; +} +window.addEventListener("MozReftestInvalidate", loadimg); +</script> + +</html> |