Files
ladybird/Tests/LibWeb/Text/input/HTML/autoplay-of-file-video-from-file-document.html
Zaggy1024 15af5fb420 Tests: Consider video autoplay succeeded when it is not paused on load
Fixes a 1 in 200ish flake on autoplay-of-file-video-from-file-document.
2026-03-17 21:36:53 -05:00

22 lines
475 B
HTML

<!DOCTYPE html>
<video autoplay id="video" src="../../../Assets/test-webm.webm" muted></video>
<script src="../include.js"></script>
<script>
asyncTest(done => {
setTimeout(() => {
println("FAIL: timeout waiting for autoplay");
done();
}, 10_000);
function autoplayed() {
println("PASS: autoplay working");
done();
}
if (video.paused) {
video.onplaying = autoplayed;
} else {
autoplayed();
}
});
</script>