1
0
Fork 0
firefox/toolkit/content/tests/reftests/audio-dynamically-change-small-width.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

32 lines
725 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<audio id="tweakme" controls></audio>
<script>
function doTest() {
setTimeout(() => {
let tweakme = document.getElementById("tweakme");
// Make the audio element extremely skinny, flush layout, and then revert
// that change:
tweakme.style.width = "1px";
tweakme.offsetHeight; // flush layout
tweakme.style.width = "";
tweakme.offsetHeight; // flush layout
document.documentElement.removeAttribute("class");
}, 300);
}
window.addEventListener("MozReftestInvalidate", doTest);
</script>
</body>