mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
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:
parent
db0dbb384e
commit
512cea5a87
Notes:
github-actions[bot]
2024-10-10 21:53:54 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/512cea5a872 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1713 Reviewed-by: https://github.com/AtkinsSJ
5 changed files with 19 additions and 6 deletions
BIN
Tests/LibWeb/Assets/test-webm.webm
Normal file
BIN
Tests/LibWeb/Assets/test-webm.webm
Normal file
Binary file not shown.
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
video loaded
|
||||
message from test iframe (1)
|
||||
PASS (didn't crash)
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue