Automatic update from web-platform-tests Change HTML Video and Audio Lazy Loading Tests from Tentative to Non-Tentative -- wpt-commits: a024f97737b84b2531e9b37e9db5f3e80a7ac110 wpt-pr: 57754
28 lines
675 B
HTML
28 lines
675 B
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Squarespace" href="https://www.squarespace.com/">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<style>
|
|
.below-viewport {
|
|
margin-top: 1000vh;
|
|
}
|
|
</style>
|
|
|
|
<audio class="below-viewport" src="/media/sine440.mp3" loading="lazy" controls></audio>
|
|
|
|
<script>
|
|
const t = async_test(
|
|
"Audio with loading=lazy that is not visible in viewport does not load audio data"
|
|
);
|
|
|
|
const audio = document.querySelector("audio");
|
|
|
|
t.step_timeout(() => {
|
|
assert_equals(audio.readyState, HTMLMediaElement.HAVE_NOTHING);
|
|
t.done();
|
|
}, 1000);
|
|
</script>
|
|
</body>
|
|
</html>
|