diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html b/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html new file mode 100644 index 0000000000..9b2783c930 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html @@ -0,0 +1,30 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Media Elements: The size of the video shouldn't be lost after an 'ended' event.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> + <link rel="author" title="Alicia Boya GarcĂa" href="mailto:aboya@igalia.com"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> +<video id="video"> + <source src="/media/test-1s.mp4" type="video/mp4"> + <source src="/media/test-1s.webm" type="video/webm"> +</video> +<script> + promise_test(async (test) => { + const eventWatcher = new EventWatcher(test, video, ["loadedmetadata", "ended"]); + await eventWatcher.wait_for("loadedmetadata"); + assert_equals(video.videoWidth, 320, "width when the video is loaded"); + assert_equals(video.videoHeight, 240, "height when the video is loaded"); + video.play(); + await eventWatcher.wait_for(["ended"]); + assert_equals(video.videoWidth, 320, "width after playback"); + assert_equals(video.videoHeight, 240, "height after playback"); + if (video.videoTracks) + assert_equals(video.videoTracks.length, 1); + }, "Video dimensions are preserved at the end of the video."); +</script> +</body> +</html> |