tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 1a24cc95a2574d8297929a84634e27a9990d0f75
parent 392dd465ebf109f7284a1c6d6f93cf238efffa66
Author: John Lin <jolin@mozilla.com>
Date:   Mon, 10 Nov 2025 19:55:38 +0000

Bug 1997997 - add test for 10/12-bit VP9 video. r=media-playback-reviewers,alwu

Differential Revision: https://phabricator.services.mozilla.com/D271672

Diffstat:
Mdom/media/test/mochitest_compat.toml | 8++++++--
Ddom/media/test/test_av1_high_professional_profiles.html | 28----------------------------
Adom/media/test/test_non_8bit_video.html | 29+++++++++++++++++++++++++++++
Adom/media/test/vp9-yuv420p10.webm^headers^ | 1+
Adom/media/test/vp9-yuv420p12.webm | 0
Adom/media/test/vp9-yuv420p12.webm^headers^ | 1+
6 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/dom/media/test/mochitest_compat.toml b/dom/media/test/mochitest_compat.toml @@ -694,6 +694,10 @@ support-files = [ "video-overhang.ogg^headers^", "vp9-superframes.webm", "vp9-superframes.webm^headers^", + "vp9-yuv420p10.webm", + "vp9-yuv420p10.webm^headers^", + "vp9-yuv420p12.webm", + "vp9-yuv420p12.webm^headers^", "vp9.webm", "vp9.webm^headers^", "vp9-short.webm", @@ -766,8 +770,6 @@ support-files = [ ["test_audioDocumentTitle.html"] skip-if = ["true"] # bug 475110 - disabled since we don't play Wave files standalone -["test_av1_high_professional_profiles.html"] - ["test_buffered.html"] ["test_bug1431810_opus_downmix_to_mono.html"] @@ -896,6 +898,8 @@ skip-if = ["os == 'win' && os_version == '11.26100' && arch == 'x86_64' && debug ["test_no_load_event.html"] +["test_non_8bit_video.html"] + ["test_not_reset_playbackRate_when_removing_nonloaded_media_from_document.html"] ["test_paused.html"] diff --git a/dom/media/test/test_av1_high_professional_profiles.html b/dom/media/test/test_av1_high_professional_profiles.html @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Test High and Professional profile AV1 video files</title> -<script src="/tests/SimpleTest/SimpleTest.js"></script> -<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> -<script type="application/javascript"> - -/** This test checks if 10- and 12-bit AV1 video plays. */ -const av1Files = ["av1-yuv444p10.webm", "av1-yuv422p10.webm", "av1-yuv444p12.webm"]; -add_task(async function testPlayAll() { - await Promise.all(av1Files.map( - (f) => { - let v = document.createElement("video"); - document.body.appendChild(v); - v.src = f; - return v; - }).map( - (v) => v.play())).then( - () => ok(true, "All AV1 video played."), - (e) => ok(false, "Play AV1 video error: " + e)); -}); - -</script> -</head> -<body> -</body> -</html> diff --git a/dom/media/test/test_non_8bit_video.html b/dom/media/test/test_non_8bit_video.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> +<head> +<title>Test 10/12-bit video files</title> +<script src="/tests/SimpleTest/SimpleTest.js"></script> +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> +<script type="application/javascript"> + +/** This test checks if 10- and 12-bit video plays. */ +const videos = ["av1-yuv444p10.webm", "av1-yuv422p10.webm", "av1-yuv444p12.webm", + "vp9-yuv420p10.webm", "vp9-yuv420p12.webm"]; +add_task(async function testPlayAll() { + await Promise.all(videos.map( + (f) => { + let v = document.createElement("video"); + document.body.appendChild(v); + v.src = f; + return v; + }).map( + (v) => v.play())).then( + () => ok(true, "All video played."), + (e) => ok(false, "Play video error: " + e)); +}); + +</script> +</head> +<body> +</body> +</html> diff --git a/dom/media/test/vp9-yuv420p10.webm^headers^ b/dom/media/test/vp9-yuv420p10.webm^headers^ @@ -0,0 +1 @@ +Cache-Control: no-store diff --git a/dom/media/test/vp9-yuv420p12.webm b/dom/media/test/vp9-yuv420p12.webm Binary files differ. diff --git a/dom/media/test/vp9-yuv420p12.webm^headers^ b/dom/media/test/vp9-yuv420p12.webm^headers^ @@ -0,0 +1 @@ +Cache-Control: no-store