LibWeb: Bring back the test video for LibWeb tests

The video was accidentally removed in commit d5ba665f89.

This adds the video back to the LibWeb/Text/data folder, and validates
that the video loads in the test that depends on it loading.
This commit is contained in:
Timothy Flynn 2024-10-10 09:59:50 -04:00 committed by Tim Flynn
parent db0dbb384e
commit 512cea5a87
Notes: github-actions[bot] 2024-10-10 21:53:54 +00:00
5 changed files with 19 additions and 6 deletions

Binary file not shown.

View file

@ -1,2 +1,2 @@
<video width="320" height="240" src="../../../../Base/res/html/misc/test-webm.webm"></video>
<video width="640" height="480" src="../../../../Base/res/html/misc/test-webm.webm"></video>
<video width="320" height="240" src="../../Assets/test-webm.webm"></video>
<video width="640" height="480" src="../../Assets/test-webm.webm"></video>

View file

@ -1 +1,10 @@
<video autoplay src="../../../../Base/res/html/misc/test-webm.webm"></video>
<video id="video" autoplay src="../../Assets/test-webm.webm"></video>
<script type="text/javascript">
video.addEventListener("loadedmetadata", () => {
parent.postMessage("video loaded", "*");
});
video.addEventListener("error", e => {
parent.postMessage(`error: ${e.target.error.message}`, "*");
});
</script>

View file

@ -1 +1,3 @@
video loaded
message from test iframe (1)
PASS (didn't crash)

View file

@ -1,11 +1,13 @@
<iframe id=iframe></iframe>
<iframe id="iframe"></iframe>
<script src="include.js"></script>
<script>
function navigateIframe(src) {
return new Promise(resolve => {
iframe.addEventListener("load", () => {
window.onmessage = e => {
println(e.data);
resolve();
});
};
iframe.src = src;
});
}