Files
sousa-gecko/testing/web-platform/tests/html/semantics/embedded-content/the-audio-element/audio-loading-eager.html
T
Scott Jehl ae104d8439 Bug 2016529 [wpt PR 57754] - Change HTML Video and Audio Lazy Loading Tests from Tentative to Non-Tentative, a=testonly
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
2026-03-30 08:08:47 +00:00

34 lines
863 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>
<body>
<script>
async_test(t => {
const audio = document.createElement("audio");
audio.id = "below_viewport";
audio.className = "below-viewport";
audio.src = "/media/sine440.mp3?pipe=trickle(d2)";
audio.loading = "eager";
audio.controls = true;
audio.addEventListener("loadeddata", () => {
t.done();
});
document.body.appendChild(audio);
t.step_timeout(() => {
assert_unreached("Eager audio should load data immediately");
}, 5000);
}, "Audio with loading='eager' loads immediately regardless of viewport position");
</script>
</body>