summaryrefslogtreecommitdiffstats
path: root/dom/media/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/media/test
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/test')
-rw-r--r--dom/media/test/background_video.js2
-rw-r--r--dom/media/test/bipbop-clearkey-video-av1.mp4bin0 -> 52054 bytes
-rw-r--r--dom/media/test/bipbop-clearkey-video-av1.mp4^headers^1
-rw-r--r--dom/media/test/bipbop-clearkey-video-av1.webmbin0 -> 50186 bytes
-rw-r--r--dom/media/test/bipbop-clearkey-video-av1.webm^headers^1
-rw-r--r--dom/media/test/browser/browser.toml4
-rw-r--r--dom/media/test/browser/browser_encrypted_play_time_telemetry.js70
-rw-r--r--dom/media/test/browser/browser_glean_first_frame_loaded_time.js81
-rw-r--r--dom/media/test/browser/browser_tab_visibility_and_play_time.js2
-rw-r--r--dom/media/test/browser/head.js119
-rw-r--r--dom/media/test/browser/wmfme/browser.toml8
-rw-r--r--dom/media/test/browser/wmfme/browser_wmfme_glean_first_frame_loaded_time.js98
-rw-r--r--dom/media/test/can_play_type_ogg.js2
-rw-r--r--dom/media/test/crashtests/crashtests.list10
-rw-r--r--dom/media/test/eme.js4
-rw-r--r--dom/media/test/manifest.js46
-rw-r--r--dom/media/test/mochitest.toml5
-rw-r--r--dom/media/test/mochitest_background_video.toml4
-rw-r--r--dom/media/test/mochitest_bugs.toml17
-rw-r--r--dom/media/test/mochitest_compat.toml13
-rw-r--r--dom/media/test/mochitest_eme.toml4
-rw-r--r--dom/media/test/mochitest_media_recorder.toml4
-rw-r--r--dom/media/test/mochitest_seek.toml4
-rw-r--r--dom/media/test/mochitest_stream.toml4
-rw-r--r--dom/media/test/reftest/color_quads/reftest.list26
-rw-r--r--dom/media/test/reftest/reftest.list14
-rw-r--r--dom/media/test/test_arraybuffer.html4
-rw-r--r--dom/media/test/test_aspectratio_mp4.html2
-rw-r--r--dom/media/test/test_background_video_resume_after_end_show_last_frame.html2
-rw-r--r--dom/media/test/test_buffered.html2
-rw-r--r--dom/media/test/test_bug1431810_opus_downmix_to_mono.html8
-rw-r--r--dom/media/test/test_cueless_webm_seek-1.html2
-rw-r--r--dom/media/test/test_cueless_webm_seek-2.html2
-rw-r--r--dom/media/test/test_cueless_webm_seek-3.html2
-rw-r--r--dom/media/test/test_decode_error_crossorigin.html2
-rw-r--r--dom/media/test/test_delay_load.html2
-rw-r--r--dom/media/test/test_eme_detach_media_keys.html2
-rw-r--r--dom/media/test/test_eme_detach_reattach_same_mediakeys_during_playback.html4
-rw-r--r--dom/media/test/test_eme_getstatusforpolicy.html2
-rw-r--r--dom/media/test/test_eme_initDataTypes.html4
-rw-r--r--dom/media/test/test_eme_mfcdm_generate_request.html6
-rw-r--r--dom/media/test/test_eme_mfcdm_getstatusforpolicy.html2
-rw-r--r--dom/media/test/test_eme_missing_pssh.html2
-rw-r--r--dom/media/test/test_eme_non_mse_fails.html2
-rw-r--r--dom/media/test/test_eme_playback.html4
-rw-r--r--dom/media/test/test_eme_protection_query.html2
-rw-r--r--dom/media/test/test_eme_pssh_in_moof.html2
-rw-r--r--dom/media/test/test_eme_requestKeySystemAccess.html4
-rw-r--r--dom/media/test/test_eme_request_notifications.html4
-rw-r--r--dom/media/test/test_eme_sample_groups_playback.html4
-rw-r--r--dom/media/test/test_eme_stream_capture_blocked_case1.html2
-rw-r--r--dom/media/test/test_eme_stream_capture_blocked_case2.html2
-rw-r--r--dom/media/test/test_eme_stream_capture_blocked_case3.html2
-rw-r--r--dom/media/test/test_eme_unsetMediaKeys_then_capture.html4
-rw-r--r--dom/media/test/test_eme_wideinve_l1_installation.html4
-rw-r--r--dom/media/test/test_eme_wv_privacy.html2
-rw-r--r--dom/media/test/test_hls_player_independency.html4
-rw-r--r--dom/media/test/test_hw_video_decoding.html5
-rw-r--r--dom/media/test/test_invalid_reject.html4
-rw-r--r--dom/media/test/test_invalid_reject_play.html4
-rw-r--r--dom/media/test/test_load.html8
-rw-r--r--dom/media/test/test_load_source.html4
-rw-r--r--dom/media/test/test_media_selection.html4
-rw-r--r--dom/media/test/test_mediarecorder_record_canvas_captureStream.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_changing_video_resolution.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_downsize_resolution.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_gum_video_timeslice.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_session.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_startstopstart.html4
-rw-r--r--dom/media/test/test_mediarecorder_record_timeslice.html2
-rw-r--r--dom/media/test/test_mediarecorder_record_upsize_resolution.html2
-rw-r--r--dom/media/test/test_mediatrack_consuming_mediaresource.html12
-rw-r--r--dom/media/test/test_mediatrack_consuming_mediastream.html8
-rw-r--r--dom/media/test/test_mediatrack_replay_from_end.html8
-rw-r--r--dom/media/test/test_midflight_redirect_blocked.html2
-rw-r--r--dom/media/test/test_mixed_principals.html2
-rw-r--r--dom/media/test/test_new_audio.html2
-rw-r--r--dom/media/test/test_periodic_timeupdate.html2
-rw-r--r--dom/media/test/test_play_twice.html2
-rw-r--r--dom/media/test/test_playback.html2
-rw-r--r--dom/media/test/test_playback_errors.html2
-rw-r--r--dom/media/test/test_playback_hls.html2
-rw-r--r--dom/media/test/test_preload_actions.html54
-rw-r--r--dom/media/test/test_preload_suspend.html2
-rw-r--r--dom/media/test/test_reset_events_async.html6
-rw-r--r--dom/media/test/test_seek-10.html2
-rw-r--r--dom/media/test/test_seekToNextFrame.html2
-rw-r--r--dom/media/test/test_temporary_file_blob_video_plays.html2
-rw-r--r--dom/media/test/test_video_dimensions.html2
-rw-r--r--dom/media/test/test_video_low_power_telemetry.html2
90 files changed, 558 insertions, 240 deletions
diff --git a/dom/media/test/background_video.js b/dom/media/test/background_video.js
index 508f8fd89a..6cce797474 100644
--- a/dom/media/test/background_video.js
+++ b/dom/media/test/background_video.js
@@ -72,7 +72,7 @@ function appendVideoToDocWithoutLoad(token, width, height) {
}
function loadAndWaitUntilLoadedmetadata(video, url, preloadType = "metadata") {
- return new Promise((resolve, reject) => {
+ return new Promise(resolve => {
video.preload = preloadType;
video.addEventListener(
"loadedmetadata",
diff --git a/dom/media/test/bipbop-clearkey-video-av1.mp4 b/dom/media/test/bipbop-clearkey-video-av1.mp4
new file mode 100644
index 0000000000..78c1e56b2b
--- /dev/null
+++ b/dom/media/test/bipbop-clearkey-video-av1.mp4
Binary files differ
diff --git a/dom/media/test/bipbop-clearkey-video-av1.mp4^headers^ b/dom/media/test/bipbop-clearkey-video-av1.mp4^headers^
new file mode 100644
index 0000000000..4030ea1d3d
--- /dev/null
+++ b/dom/media/test/bipbop-clearkey-video-av1.mp4^headers^
@@ -0,0 +1 @@
+Cache-Control: no-store
diff --git a/dom/media/test/bipbop-clearkey-video-av1.webm b/dom/media/test/bipbop-clearkey-video-av1.webm
new file mode 100644
index 0000000000..840888a8b1
--- /dev/null
+++ b/dom/media/test/bipbop-clearkey-video-av1.webm
Binary files differ
diff --git a/dom/media/test/bipbop-clearkey-video-av1.webm^headers^ b/dom/media/test/bipbop-clearkey-video-av1.webm^headers^
new file mode 100644
index 0000000000..4030ea1d3d
--- /dev/null
+++ b/dom/media/test/bipbop-clearkey-video-av1.webm^headers^
@@ -0,0 +1 @@
+Cache-Control: no-store
diff --git a/dom/media/test/browser/browser.toml b/dom/media/test/browser/browser.toml
index cf25369576..3e83448d47 100644
--- a/dom/media/test/browser/browser.toml
+++ b/dom/media/test/browser/browser.toml
@@ -2,6 +2,7 @@
subsuite = "media-bc"
prefs = ["gfx.font_loader.delay=0"]
support-files = [
+ "head.js",
"file_empty_page.html",
"file_media.html",
"../av1.mp4",
@@ -16,11 +17,14 @@ support-files = [
"../small-shot.mp3",
"../small-shot.ogg",
"../TestPatternHDR.mp4",
+ "../../mediasource/test/bipbop/bipbop2s.mp4",
]
["browser_encrypted_play_time_telemetry.js"]
skip-if = ["apple_silicon"] # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
+["browser_glean_first_frame_loaded_time.js"]
+
["browser_tab_visibility_and_play_time.js"]
["browser_telemetry_video_hardware_decoding_support.js"]
diff --git a/dom/media/test/browser/browser_encrypted_play_time_telemetry.js b/dom/media/test/browser/browser_encrypted_play_time_telemetry.js
index ff4f2753ec..1a64717419 100644
--- a/dom/media/test/browser/browser_encrypted_play_time_telemetry.js
+++ b/dom/media/test/browser/browser_encrypted_play_time_telemetry.js
@@ -29,76 +29,6 @@ async function clearTelemetry() {
});
}
-// Opens a tab containing a blank page, returns a promise that will resolve
-// to that tab.
-async function openTab() {
- const emptyPageUri =
- "https://example.com/browser/dom/media/test/browser/file_empty_page.html";
- return BrowserTestUtils.openNewForegroundTab(window.gBrowser, emptyPageUri);
-}
-
-// Creates and configures a video element for EME playback in `tab`. Does not
-// start playback for the element. Returns a promise that will resolve once
-// the element is setup and ready for playback.
-async function loadEmeVideo(tab) {
- const emeHelperUri =
- gTestPath.substr(0, gTestPath.lastIndexOf("/")) + "/eme_standalone.js";
- return SpecialPowers.spawn(
- tab.linkedBrowser,
- [emeHelperUri],
- async _emeHelperUri => {
- // Begin helper functions.
- async function once(target, name) {
- return new Promise(r =>
- target.addEventListener(name, r, { once: true })
- );
- }
-
- // Helper to clone data into content so the EME helper can use the data.
- function cloneIntoContent(data) {
- return Cu.cloneInto(data, content.wrappedJSObject);
- }
- // End helper functions.
-
- // Load the EME helper into content.
- Services.scriptloader.loadSubScript(_emeHelperUri, content);
- // Setup EME with the helper.
- let video = content.document.createElement("video");
- video.id = "media";
- content.document.body.appendChild(video);
- let emeHelper = new content.wrappedJSObject.EmeHelper();
- emeHelper.SetKeySystem(
- content.wrappedJSObject.EmeHelper.GetClearkeyKeySystemString()
- );
- emeHelper.SetInitDataTypes(cloneIntoContent(["webm"]));
- emeHelper.SetVideoCapabilities(
- cloneIntoContent([{ contentType: 'video/webm; codecs="vp9"' }])
- );
- emeHelper.AddKeyIdAndKey(
- "2cdb0ed6119853e7850671c3e9906c3c",
- "808b9adac384de1e4f56140f4ad76194"
- );
- emeHelper.onerror = error => {
- is(false, `Got unexpected error from EME helper: ${error}`);
- };
- await emeHelper.ConfigureEme(video);
- // Done setting up EME.
-
- // Setup MSE.
- const ms = new content.wrappedJSObject.MediaSource();
- video.src = content.wrappedJSObject.URL.createObjectURL(ms);
- await once(ms, "sourceopen");
- const sb = ms.addSourceBuffer("video/webm");
- const videoFile = "sintel-short-clearkey-subsample-encrypted-video.webm";
- let fetchResponse = await content.fetch(videoFile);
- sb.appendBuffer(await fetchResponse.arrayBuffer());
- await once(sb, "updateend");
- ms.endOfStream();
- await once(ms, "sourceended");
- }
- );
-}
-
// Plays the media in `tab` until the 'ended' event is fire. Returns a promise
// that resolves once that state has been reached.
async function playMediaThrough(tab) {
diff --git a/dom/media/test/browser/browser_glean_first_frame_loaded_time.js b/dom/media/test/browser/browser_glean_first_frame_loaded_time.js
new file mode 100644
index 0000000000..1acfa9957e
--- /dev/null
+++ b/dom/media/test/browser/browser_glean_first_frame_loaded_time.js
@@ -0,0 +1,81 @@
+"use strict";
+
+// Disabling undef warning because in `run()` we use functions from head.js
+/* eslint-disable no-undef */
+
+/**
+ * This test is used to ensure that Glean probe 'first_frame_loaded' can be
+ * recorded correctly in different situations.
+ */
+
+const testCases = [
+ {
+ expected: {
+ playback_type: "Non-MSE playback",
+ video_codec: "video/avc",
+ resolution: "AV,240<h<=480",
+ key_system: undefined,
+ },
+ async run(tab) {
+ await loadVideo(tab);
+ },
+ },
+ {
+ expected: {
+ playback_type: "MSE playback",
+ video_codec: "video/avc",
+ resolution: "AV,240<h<=480",
+ key_system: undefined,
+ },
+ async run(tab) {
+ await loadMseVideo(tab);
+ },
+ },
+ {
+ expected: {
+ playback_type: "EME playback",
+ video_codec: "video/vp9",
+ resolution: "V,240<h<=480",
+ key_system: "org.w3.clearkey",
+ },
+ async run(tab) {
+ await loadEmeVideo(tab);
+ },
+ },
+];
+
+add_task(async function testGleanMediaPlayackFirstFrameLoaded() {
+ for (let test of testCases) {
+ Services.fog.testResetFOG();
+
+ const expected = test.expected;
+ info(`running test for '${expected.playback_type}'`);
+ const tab = await openTab();
+ await test.run(tab);
+
+ info(`waiting until glean probe is ready on the parent process`);
+ await Services.fog.testFlushAllChildren();
+
+ info("checking the collected results");
+ const extra = Glean.mediaPlayback.firstFrameLoaded.testGetValue()[0].extra;
+ Assert.greater(
+ parseInt(extra.first_frame_loaded_time),
+ 0,
+ `${extra.first_frame_loaded_time} is correct`
+ );
+ is(
+ extra.playback_type,
+ expected.playback_type,
+ `${extra.playback_type} is correct`
+ );
+ is(
+ extra.video_codec,
+ expected.video_codec,
+ `${extra.video_codec} is correct`
+ );
+ is(extra.resolution, expected.resolution, `${extra.resolution} is correct`);
+ is(extra.key_system, expected.key_system, `${extra.key_system} is correct`);
+
+ BrowserTestUtils.removeTab(tab);
+ }
+});
diff --git a/dom/media/test/browser/browser_tab_visibility_and_play_time.js b/dom/media/test/browser/browser_tab_visibility_and_play_time.js
index 4d33826091..b152f490c9 100644
--- a/dom/media/test/browser/browser_tab_visibility_and_play_time.js
+++ b/dom/media/test/browser/browser_tab_visibility_and_play_time.js
@@ -54,7 +54,7 @@ async function openMediaTab(url) {
return new Promise(resolve => {
element.addEventListener(
"timeupdate",
- e => {
+ () => {
resolve();
},
{ once: true }
diff --git a/dom/media/test/browser/head.js b/dom/media/test/browser/head.js
new file mode 100644
index 0000000000..7ef578a804
--- /dev/null
+++ b/dom/media/test/browser/head.js
@@ -0,0 +1,119 @@
+"use strict";
+
+/* import-globals-from ../eme_standalone.js */
+
+// Opens a tab containing a blank page, returns a promise that will resolve
+// to that tab.
+function openTab() {
+ const emptyPageUri =
+ "https://example.com/browser/dom/media/test/browser/file_empty_page.html";
+ return BrowserTestUtils.openNewForegroundTab(window.gBrowser, emptyPageUri);
+}
+
+// Creates and configures a video element for non-MSE playback in `tab`. Does not
+// start playback for the element. Returns a promise that will resolve once
+// the element is setup and ready for playback.
+function loadVideo(tab) {
+ return SpecialPowers.spawn(tab.linkedBrowser, [], async _ => {
+ let video = content.document.createElement("video");
+ video.id = "media";
+ content.document.body.appendChild(video);
+
+ video.src = "gizmo.mp4";
+ video.load();
+
+ info(`waiting 'loadeddata' event to ensure playback is ready`);
+ await new Promise(r => (video.onloadeddata = r));
+ });
+}
+
+// Creates and configures a video element for MSE playback in `tab`. Does not
+// start playback for the element. Returns a promise that will resolve once
+// the element is setup and ready for playback.
+function loadMseVideo(tab) {
+ return SpecialPowers.spawn(tab.linkedBrowser, [], async _ => {
+ async function once(target, name) {
+ return new Promise(r => target.addEventListener(name, r, { once: true }));
+ }
+
+ let video = content.document.createElement("video");
+ video.id = "media";
+ content.document.body.appendChild(video);
+
+ info(`starting setup MSE`);
+ const ms = new content.wrappedJSObject.MediaSource();
+ video.src = content.wrappedJSObject.URL.createObjectURL(ms);
+ await once(ms, "sourceopen");
+ const sb = ms.addSourceBuffer("video/mp4");
+ const videoFile = "bipbop2s.mp4";
+ let fetchResponse = await content.fetch(videoFile);
+ sb.appendBuffer(await fetchResponse.arrayBuffer());
+ await once(sb, "updateend");
+ ms.endOfStream();
+ await once(ms, "sourceended");
+
+ info(`waiting 'loadeddata' event to ensure playback is ready`);
+ await once(video, "loadeddata");
+ });
+}
+
+// Creates and configures a video element for EME playback in `tab`. Does not
+// start playback for the element. Returns a promise that will resolve once
+// the element is setup and ready for playback.
+function loadEmeVideo(tab) {
+ const emeHelperUri =
+ gTestPath.substr(0, gTestPath.lastIndexOf("/")) + "/eme_standalone.js";
+ return SpecialPowers.spawn(
+ tab.linkedBrowser,
+ [emeHelperUri],
+ async _emeHelperUri => {
+ async function once(target, name) {
+ return new Promise(r =>
+ target.addEventListener(name, r, { once: true })
+ );
+ }
+
+ // Helper to clone data into content so the EME helper can use the data.
+ function cloneIntoContent(data) {
+ return Cu.cloneInto(data, content.wrappedJSObject);
+ }
+
+ info(`starting setup EME`);
+ Services.scriptloader.loadSubScript(_emeHelperUri, content);
+ let video = content.document.createElement("video");
+ video.id = "media";
+ content.document.body.appendChild(video);
+ let emeHelper = new content.wrappedJSObject.EmeHelper();
+ emeHelper.SetKeySystem(
+ content.wrappedJSObject.EmeHelper.GetClearkeyKeySystemString()
+ );
+ emeHelper.SetInitDataTypes(cloneIntoContent(["webm"]));
+ emeHelper.SetVideoCapabilities(
+ cloneIntoContent([{ contentType: 'video/webm; codecs="vp9"' }])
+ );
+ emeHelper.AddKeyIdAndKey(
+ "2cdb0ed6119853e7850671c3e9906c3c",
+ "808b9adac384de1e4f56140f4ad76194"
+ );
+ emeHelper.onerror = error => {
+ is(false, `Got unexpected error from EME helper: ${error}`);
+ };
+ await emeHelper.ConfigureEme(video);
+
+ info(`starting setup MSE`);
+ const ms = new content.wrappedJSObject.MediaSource();
+ video.src = content.wrappedJSObject.URL.createObjectURL(ms);
+ await once(ms, "sourceopen");
+ const sb = ms.addSourceBuffer("video/webm");
+ const videoFile = "sintel-short-clearkey-subsample-encrypted-video.webm";
+ let fetchResponse = await content.fetch(videoFile);
+ sb.appendBuffer(await fetchResponse.arrayBuffer());
+ await once(sb, "updateend");
+ ms.endOfStream();
+ await once(ms, "sourceended");
+
+ info(`waiting 'loadeddata' event to ensure playback is ready`);
+ await once(video, "loadeddata");
+ }
+ );
+}
diff --git a/dom/media/test/browser/wmfme/browser.toml b/dom/media/test/browser/wmfme/browser.toml
index 422ea29228..7449d232d9 100644
--- a/dom/media/test/browser/wmfme/browser.toml
+++ b/dom/media/test/browser/wmfme/browser.toml
@@ -3,11 +3,17 @@ subsuite = "media-bc"
tags = "media-engine-compatible"
run-if = ["wmfme"]
support-files = [
- "head.js",
"file_video.html",
+ "head.js",
+ "../head.js",
+ "../../eme_standalone.js",
"../../gizmo.mp4",
+ "../../sintel-short-clearkey-subsample-encrypted-video.webm",
+ "../../../mediasource/test/bipbop/bipbop2s.mp4",
]
["browser_wmfme_crash.js"]
+["browser_wmfme_glean_first_frame_loaded_time.js"]
+
["browser_wmfme_max_crashes.js"]
diff --git a/dom/media/test/browser/wmfme/browser_wmfme_glean_first_frame_loaded_time.js b/dom/media/test/browser/wmfme/browser_wmfme_glean_first_frame_loaded_time.js
new file mode 100644
index 0000000000..f9e97aaa49
--- /dev/null
+++ b/dom/media/test/browser/wmfme/browser_wmfme_glean_first_frame_loaded_time.js
@@ -0,0 +1,98 @@
+"use strict";
+
+// Disabling undef warning because in `run()` we use functions from head.js
+/* eslint-disable no-undef */
+
+/**
+ * This test is used to ensure that Glean probe 'first_frame_loaded' can be
+ * recorded correctly in different situations.
+ */
+
+/* import-globals-from ../head.js */
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/dom/media/test/browser/head.js",
+ this
+);
+
+add_task(async function setupTestingPref() {
+ await SpecialPowers.pushPrefEnv({
+ set: [
+ ["media.wmf.media-engine.enabled", 1],
+ ["media.wmf.media-engine.channel-decoder.enabled", true],
+ ["media.eme.wmf.clearkey.enabled", true],
+ ],
+ });
+});
+
+const testCases = [
+ {
+ expected: {
+ playback_type: "Non-MSE media-engine playback",
+ video_codec: "video/avc",
+ resolution: "AV,240<h<=480",
+ key_system: undefined,
+ },
+ async run(tab) {
+ await loadVideo(tab);
+ },
+ },
+ {
+ expected: {
+ playback_type: "MSE media-engine playback",
+ video_codec: "video/avc",
+ resolution: "AV,240<h<=480",
+ key_system: undefined,
+ },
+ async run(tab) {
+ await loadMseVideo(tab);
+ },
+ },
+ // TODO : we're not able to run MFCDM EME playback yet, see bug 1870722.
+ // {
+ // expected: {
+ // playback_type: "EME media-engine playback",
+ // video_codec: "video/vp9",
+ // resolution: "V,240<h<=480",
+ // key_system: "org.w3.clearkey",
+ // },
+ // async run(tab) {
+ // await loadEmeVideo(tab);
+ // },
+ // },
+];
+
+add_task(async function testGleanMediaPlayackFirstFrameLoaded() {
+ for (let test of testCases) {
+ Services.fog.testResetFOG();
+
+ const expected = test.expected;
+ info(`running test for '${expected.playback_type}'`);
+ const tab = await openTab();
+ await test.run(tab);
+
+ info(`waiting until glean probe is ready on the parent process`);
+ await Services.fog.testFlushAllChildren();
+
+ info("checking the collected results");
+ const extra = Glean.mediaPlayback.firstFrameLoaded.testGetValue()[0].extra;
+ Assert.greater(
+ parseInt(extra.first_frame_loaded_time),
+ 0,
+ `${extra.first_frame_loaded_time} is correct`
+ );
+ is(
+ extra.playback_type,
+ expected.playback_type,
+ `${extra.playback_type} is correct`
+ );
+ is(
+ extra.video_codec,
+ expected.video_codec,
+ `${extra.video_codec} is correct`
+ );
+ is(extra.resolution, expected.resolution, `${extra.resolution} is correct`);
+ is(extra.key_system, expected.key_system, `${extra.key_system} is correct`);
+
+ BrowserTestUtils.removeTab(tab);
+ }
+});
diff --git a/dom/media/test/can_play_type_ogg.js b/dom/media/test/can_play_type_ogg.js
index 79bf8a554c..6572ab7c0f 100644
--- a/dom/media/test/can_play_type_ogg.js
+++ b/dom/media/test/can_play_type_ogg.js
@@ -4,7 +4,7 @@ function check_ogg(v, enabled, finish) {
}
function basic_test() {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
// Ogg types
check("video/ogg", "maybe");
check("audio/ogg", "maybe");
diff --git a/dom/media/test/crashtests/crashtests.list b/dom/media/test/crashtests/crashtests.list
index 637b161e7f..2383510ce9 100644
--- a/dom/media/test/crashtests/crashtests.list
+++ b/dom/media/test/crashtests/crashtests.list
@@ -1,4 +1,4 @@
-skip-if(OSX) load 1185191.html # this needs to run near the beginning of the test suite
+skip-if(cocoaWidget) load 1185191.html # this needs to run near the beginning of the test suite
load 0-timescale.html # bug 1229166
skip-if(Android) pref(media.autoplay.default,0) load 459439-1.html # bug 888557
load 466607-1.html
@@ -14,7 +14,7 @@ load 497734-2.html
load 576612-1.html
load 752784-1.html
skip-if(Android) load 789075-1.html # bug 1374405 for android
-skip-if(Android&&AndroidVersion=='22') HTTP load 795892-1.html # bug 1358718
+HTTP load 795892-1.html # bug 1358718
load 844563.html
load 846612.html
load 852838.html
@@ -76,7 +76,7 @@ skip-if(Android) test-pref(media.navigator.permission.disabled,true) load 102845
load 1041466.html
load 1045650.html
load 1080986.html
-skip-if(Android&&AndroidVersion=='21') load 1180881.html # bug 1409365
+load 1180881.html # bug 1409365
load 1197935.html
load 1122218.html
load 1127188.html
@@ -113,7 +113,7 @@ HTTP load media-element-source-seek-1.html
load offline-buffer-source-ended-1.html
load oscillator-ended-1.html
load oscillator-ended-2.html
-skip-if(Android&&AndroidVersion=='22') load video-replay-after-audio-end.html # bug 1315125, bug 1358876
+load video-replay-after-audio-end.html # bug 1315125, bug 1358876
# This needs to run at the end to avoid leaking busted state into other tests.
skip-if(Android||ThreadSanitizer) load 691096-1.html # Bug 1365451
load 1236639.html
@@ -122,7 +122,7 @@ load 1414444.mp4
load 1494073.html
skip-if(Android) load 1526044.html # Bug 1528391
load 1530897.webm
-skip-if(Android&&AndroidVersion<21) load encrypted-track-with-bad-sample-description-index.mp4 # Bug 1533211, unkip after bug 1550912
+load encrypted-track-with-bad-sample-description-index.mp4 # Bug 1533211, unkip after bug 1550912
load encrypted-track-without-tenc.mp4 # Bug 1533215
asserts-if(Android,0-1) load encrypted-track-with-sample-missing-cenc-aux.mp4 # Bug 1533625, bug 1588967
load 1538727.html
diff --git a/dom/media/test/eme.js b/dom/media/test/eme.js
index 927c99876a..d8eb1e78eb 100644
--- a/dom/media/test/eme.js
+++ b/dom/media/test/eme.js
@@ -440,7 +440,7 @@ function SetupEME(v, test, token) {
}
function fetchWithXHR(uri, onLoadFunction) {
- var p = new Promise(function (resolve, reject) {
+ var p = new Promise(function (resolve) {
var xhr = new XMLHttpRequest();
xhr.open("GET", uri, true);
xhr.responseType = "arraybuffer";
@@ -463,7 +463,7 @@ function fetchWithXHR(uri, onLoadFunction) {
}
function once(target, name, cb) {
- var p = new Promise(function (resolve, reject) {
+ var p = new Promise(function (resolve) {
target.addEventListener(
name,
function (arg) {
diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js
index bb4557d498..c357309021 100644
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -817,7 +817,7 @@ var gOggTrackInfoResults = {
function makeAbsolutePathConverter() {
const url = SimpleTest.getTestFileURL("chromeHelper.js");
const script = SpecialPowers.loadChromeScript(url);
- return new Promise((resolve, reject) => {
+ return new Promise(resolve => {
script.addMessageListener("media-test:cwd", cwd => {
if (!cwd) {
ok(false, "Failed to find path to test files");
@@ -1891,6 +1891,46 @@ var gEMETests = [
sessionCount: 1,
duration: 1.98,
},
+ // ffmpeg -i bipbop.mp4 -t 00:00:02 -c:v libaom-av1 bipbop_av1.mp4
+ // packager-linux-x64 in=bipbop_av1.mp4,stream=video,out=bipbop-clearkey-video-av1.mp4 --enable_raw_key_encryption --keys label=:key_id=8b5df745ad84145b5617c33116e35a67:key=bddfd35dd9be033ee73bc18bc1885056 --clear_lead 0
+ {
+ name: "MP4 av1 video clearkey",
+ tracks: [
+ {
+ name: "video",
+ type: 'video/mp4; codecs="av1"',
+ fragments: ["bipbop-clearkey-video-av1.mp4"],
+ },
+ ],
+ keys: {
+ // "keyid" : "key"
+ "8b5df745ad84145b5617c33116e35a67": "bddfd35dd9be033ee73bc18bc1885056",
+ },
+ sessionType: "temporary",
+ sessionCount: 1,
+ duration: 2.0,
+ skipTests: ["waitingforkey"],
+ },
+ // ffmpeg -i bipbop.mp4 -t 00:00:02 -c:v libaom-av1 bipbop_av1.webm
+ // packager-linux-x64 in=bipbop_av1.webm,stream=video,out=bipbop-clearkey-video-av1.webm --enable_raw_key_encryption --keys label=:key_id=8b5df745ad84145b5617c33116e35a67:key=bddfd35dd9be033ee73bc18bc1885056 --clear_lead 0
+ {
+ name: "WebM av1 video clearkey",
+ tracks: [
+ {
+ name: "video",
+ type: 'video/webm; codecs="av1"',
+ fragments: ["bipbop-clearkey-video-av1.webm"],
+ },
+ ],
+ keys: {
+ // "keyid" : "key"
+ "8b5df745ad84145b5617c33116e35a67": "bddfd35dd9be033ee73bc18bc1885056",
+ },
+ sessionType: "temporary",
+ sessionCount: 1,
+ duration: 2.0,
+ skipTests: ["waitingforkey"],
+ },
{
name: "WebM vorbis audio & vp8 video clearkey",
tracks: [
@@ -2241,7 +2281,7 @@ function removeNodeAndSource(n) {
}
function once(target, name, cb) {
- var p = new Promise(function (resolve, reject) {
+ var p = new Promise(function (resolve) {
target.addEventListener(
name,
function () {
@@ -2262,7 +2302,7 @@ function once(target, name, cb) {
* @returns {Promise} A promise that is resolved when event happens.
*/
function nextEvent(video, eventName) {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
let f = function (event) {
video.removeEventListener(eventName, f);
resolve(event);
diff --git a/dom/media/test/mochitest.toml b/dom/media/test/mochitest.toml
index de8c690255..3c8a382766 100644
--- a/dom/media/test/mochitest.toml
+++ b/dom/media/test/mochitest.toml
@@ -88,6 +88,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
@@ -798,6 +802,7 @@ skip-if = [
"os == 'mac'", # 1517199 (timeout-on-osx)
"os == 'linux'", # 1713397, 1719881 (high intermittent failure on linux tsan), 1776937
"apple_silicon", # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
+ "mda_gpu", # Disabled because high intermittent failure
]
["test_chaining.html"]
diff --git a/dom/media/test/mochitest_background_video.toml b/dom/media/test/mochitest_background_video.toml
index 762a9a8648..e1bc542264 100644
--- a/dom/media/test/mochitest_background_video.toml
+++ b/dom/media/test/mochitest_background_video.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
diff --git a/dom/media/test/mochitest_bugs.toml b/dom/media/test/mochitest_bugs.toml
index 9d4a0dea2f..5c68d0e795 100644
--- a/dom/media/test/mochitest_bugs.toml
+++ b/dom/media/test/mochitest_bugs.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
@@ -769,7 +773,10 @@ support-files = [
["test_bug465498.html"]
["test_bug495145.html"]
-skip-if = ["os == 'win'"] #Bug 1404373
+skip-if = [
+ "win10_2009", #Bug 1404373
+ "win11_2009", #Bug 1404373
+]
["test_bug495300.html"]
@@ -786,15 +793,15 @@ skip-if = ["os == 'android'"] # bug 1285441, android(bug 1232305)
tags = "capturestream"
["test_bug895305.html"]
-skip-if = ["android_version == '25' && debug"] # android(bug 1232305)
["test_bug919265.html"]
-skip-if = ["android_version == '25' && debug"] # android(bug 1232305)
["test_bug1113600.html"]
skip-if = [
- "os == 'win' && os_version == '10.0' && debug", # Bug 1713410
- "os == 'mac'", # Bug 1198168
+ "win10_2009 && debug", # Bug 1713410
+ "win11_2009 && debug", # Bug 1713410
+ "apple_catalina", # Bug 1198168
+ "apple_silicon", # Bug 1198168
]
["test_bug1120222.html"]
diff --git a/dom/media/test/mochitest_compat.toml b/dom/media/test/mochitest_compat.toml
index c477661a19..86f76f1464 100644
--- a/dom/media/test/mochitest_compat.toml
+++ b/dom/media/test/mochitest_compat.toml
@@ -90,6 +90,10 @@ support-files = [
"bipbop-cenc-videoinit.mp4^headers^",
"bipbop-cenc-video-10s.mp4",
"bipbop-cenc-video-10s.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4",
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
@@ -807,15 +811,12 @@ skip-if = ["true"] # bug 475110 - disabled since we don't play Wave files standa
["test_bug1431810_opus_downmix_to_mono.html"]
["test_can_play_type.html"]
-skip-if = ["(android_version == '25' && debug)"] # android(bug 1232305)
["test_can_play_type_mpeg.html"]
["test_can_play_type_no_ogg.html"]
-skip-if = ["(android_version == '25' && debug)"] # android(bug 1232305)
["test_can_play_type_ogg.html"]
-skip-if = ["(android_version == '25' && debug)"] # android(bug 1232305)
["test_can_play_type_wave.html"]
@@ -1000,10 +1001,12 @@ skip-if = ["true"] # see bug 1319725
["test_readyState.html"]
["test_referer.html"]
-skip-if = ["android_version == '25' && debug"] # android(bug 1232305)
["test_reset_src.html"]
-skip-if = ["verify && debug && os == 'win'"]
+skip-if = [
+ "win10_2009 && debug && verify",
+ "win11_2009 && debug && verify",
+]
["test_source.html"]
diff --git a/dom/media/test/mochitest_eme.toml b/dom/media/test/mochitest_eme.toml
index 696e0e947e..d7f39c3eb8 100644
--- a/dom/media/test/mochitest_eme.toml
+++ b/dom/media/test/mochitest_eme.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
diff --git a/dom/media/test/mochitest_media_recorder.toml b/dom/media/test/mochitest_media_recorder.toml
index 428f99601d..a4893d9cf4 100644
--- a/dom/media/test/mochitest_media_recorder.toml
+++ b/dom/media/test/mochitest_media_recorder.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
diff --git a/dom/media/test/mochitest_seek.toml b/dom/media/test/mochitest_seek.toml
index 0c90bd1bfb..d71aac775a 100644
--- a/dom/media/test/mochitest_seek.toml
+++ b/dom/media/test/mochitest_seek.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
diff --git a/dom/media/test/mochitest_stream.toml b/dom/media/test/mochitest_stream.toml
index 043f8471d4..0badfc52ab 100644
--- a/dom/media/test/mochitest_stream.toml
+++ b/dom/media/test/mochitest_stream.toml
@@ -84,6 +84,10 @@ support-files = [
"bipbop-clearkey-keyrotation-clear-lead-audio.mp4^headers^",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4",
"bipbop-clearkey-keyrotation-clear-lead-video.mp4^headers^",
+ "bipbop-clearkey-video-av1.mp4",
+ "bipbop-clearkey-video-av1.mp4^headers^",
+ "bipbop-clearkey-video-av1.webm",
+ "bipbop-clearkey-video-av1.webm^headers^",
"bipbop_225w_175kbps.mp4",
"bipbop_225w_175kbps.mp4^headers^",
"bipbop_225w_175kbps-cenc-audio-key1-1.m4s",
diff --git a/dom/media/test/reftest/color_quads/reftest.list b/dom/media/test/reftest/color_quads/reftest.list
index 6071733f76..63a538b78a 100644
--- a/dom/media/test/reftest/color_quads/reftest.list
+++ b/dom/media/test/reftest/color_quads/reftest.list
@@ -14,35 +14,35 @@ defaults pref(media.av1.enabled,true)
# -
# yuv420p
-fuzzy(16-51,5234-5622) fuzzy-if(swgl,32-38,1600-91746) fuzzy-if(useDrawSnapshot,16-16,11600-11600) fuzzy-if(OSX,16-73,5212-5622) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm ../reftest_img.html?src=color_quads/720p.png
-fuzzy-if(winWidget&&swgl,0-20,0-5620) fuzzy-if(winWidget&&!swgl,0-1,0-78) fuzzy-if(Android,254-255,273680-273807) fuzzy-if(OSX,0-35,0-1947) fuzzy-if(OSX&&swgl,0-67,0-5451) fuzzy-if(appleSilicon,30-48,1760-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
+fuzzy(16-51,5234-5622) fuzzy-if(swgl,32-38,1600-91746) fuzzy-if(useDrawSnapshot,16-16,11600-11600) fuzzy-if(cocoaWidget,16-73,5212-5622) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm ../reftest_img.html?src=color_quads/720p.png
+fuzzy-if(winWidget&&swgl,0-20,0-5620) fuzzy-if(winWidget&&!swgl,0-1,0-78) fuzzy-if(Android,254-255,273680-273807) fuzzy-if(cocoaWidget,0-35,0-1947) fuzzy-if(cocoaWidget&&swgl,0-67,0-5451) fuzzy-if(appleSilicon,30-48,1760-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
fuzzy-if(winWidget,0-1,0-78) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
-skip-if(winWidget&&isCoverageBuild) fuzzy(0-16,75-1941) fuzzy-if(Android,28-255,273680-359920) fuzzy-if(OSX,30-32,187326-187407) fuzzy-if(appleSilicon,30-48,1835-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
-fuzzy-if(winWidget&&swgl,0-20,0-5620) fuzzy-if(winWidget&&!swgl,0-1,0-78) fuzzy-if(Android,254-255,273680-273807) fuzzy-if(OSX,0-35,0-1947) fuzzy-if(OSX&&swgl,0-67,0-5451) fuzzy-if(appleSilicon,30-48,1760-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
+skip-if(winWidget&&isCoverageBuild) fuzzy(0-16,75-1941) fuzzy-if(Android,28-255,273680-359920) fuzzy-if(cocoaWidget,30-32,187326-187407) fuzzy-if(appleSilicon,30-48,1835-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
+fuzzy-if(winWidget&&swgl,0-20,0-5620) fuzzy-if(winWidget&&!swgl,0-1,0-78) fuzzy-if(Android,254-255,273680-273807) fuzzy-if(cocoaWidget,0-35,0-1947) fuzzy-if(cocoaWidget&&swgl,0-67,0-5451) fuzzy-if(appleSilicon,30-48,1760-187409) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p.av1.webm
skip-if(Android) fuzzy(16-48,8107-8818) fuzzy-if(winWidget&&swgl,31-38,8240-184080) fuzzy-if(appleSilicon,33-38,8819-11705) fuzzy-if(useDrawSnapshot,20-20,187200-187200) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm ../reftest_img.html?src=color_quads/720p.png
skip-if(Android) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
# On Windows & sw render, we noticed that the comparison image captured from AV1 is not equal to its displayed video frame, so we would need to compare other codecs directly to PNG file. That should be fixed in bug 1748540.
-skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(OSX,0-16,0-1718) fuzzy-if(OSX&&swgl,0-20,0-2423) fuzzy-if(appleSilicon,0-16,0-1874) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
-skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(OSX,2-36,184281-187407) fuzzy-if(winWidget,0-21,0-360000) fuzzy-if(appleSilicon,36-49,187329-187407) fuzzy-if(useDrawSnapshot,0-1,0-10) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
-skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(OSX,0-16,0-1718) fuzzy-if(OSX&&swgl,0-20,0-2423) fuzzy-if(appleSilicon,0-16,0-1874) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
+skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(cocoaWidget,0-16,0-1718) fuzzy-if(cocoaWidget&&swgl,0-20,0-2423) fuzzy-if(appleSilicon,0-16,0-1874) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
+skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(cocoaWidget,2-36,184281-187407) fuzzy-if(winWidget,0-21,0-360000) fuzzy-if(appleSilicon,36-49,187329-187407) fuzzy-if(useDrawSnapshot,0-1,0-10) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
+skip-if(Android) skip-if(winWidget&&swgl) fuzzy-if(Android,255-255,273726-273726) fuzzy-if(cocoaWidget,0-16,0-1718) fuzzy-if(cocoaWidget&&swgl,0-20,0-2423) fuzzy-if(appleSilicon,0-16,0-1874) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.av1.webm
skip-if(Android) skip-if(!(winWidget&&swgl)) fuzzy(0-35,0-8506) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.webm ../reftest_img.html?src=color_quads/720p.png
skip-if(Android) skip-if(!(winWidget&&swgl)) fuzzy(0-35,0-8506) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p.vp9.mp4 ../reftest_img.html?src=color_quads/720p.png
# -
# yuv420p10
-skip-if(Android) fuzzy(33-49,1870-2579) fuzzy-if(swgl,34-52,180421-270528) fuzzy-if(useDrawSnapshot,16-16,183840-183840) fuzzy-if(OSX,60-74,270329-271024) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm ../reftest_img.html?src=color_quads/720p.png
-skip-if(Android) fuzzy-if(OSX,0-12,0-187770) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
+skip-if(Android) fuzzy(33-49,1870-2579) fuzzy-if(swgl,34-52,180421-270528) fuzzy-if(useDrawSnapshot,16-16,183840-183840) fuzzy-if(cocoaWidget,60-74,270329-271024) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm ../reftest_img.html?src=color_quads/720p.png
+skip-if(Android) fuzzy-if(cocoaWidget,0-12,0-187770) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
skip-if(Android) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
#[2] skip-if(Android) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
-skip-if(Android) fuzzy-if(OSX,0-12,0-187770) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
+skip-if(Android) fuzzy-if(cocoaWidget,0-12,0-187770) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.tv.yuv420p10.av1.webm
-skip-if(Android) fuzzy(33-49,174620-270059) fuzzy-if(swgl&&!winWidget,36-52,11553-11555) fuzzy-if(swgl&&winWidget,36-52,11554-187200) fuzzy-if(swgl&&OSX,34-50,11465-270059) fuzzy-if(useDrawSnapshot,20-20,186800-186800) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm ../reftest_img.html?src=color_quads/720p.png
-skip-if(Android) fuzzy-if(OSX,0-12,0-274122) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
+skip-if(Android) fuzzy(33-49,174620-270059) fuzzy-if(!winWidget&&swgl,36-52,11553-11555) fuzzy-if(winWidget&&swgl,36-52,11554-187200) fuzzy-if(swgl&&cocoaWidget,34-50,11465-270059) fuzzy-if(useDrawSnapshot,20-20,186800-186800) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm ../reftest_img.html?src=color_quads/720p.png
+skip-if(Android) fuzzy-if(cocoaWidget,0-12,0-274122) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.vp9.webm ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
skip-if(Android) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
#[2] skip-if(Android) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.h264.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
-skip-if(Android) fuzzy-if(OSX,0-12,0-274122) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
+skip-if(Android) fuzzy-if(cocoaWidget,0-12,0-274122) == ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.vp9.mp4 ../reftest_video.html?src=color_quads/720p.png.bt709.bt709.pc.yuv420p10.av1.webm
# Android is really broken in a variety of ways for p10.
#[2]: yuv420p10 broken in h264.mp4: https://bugzilla.mozilla.org/show_bug.cgi?id=1711812
diff --git a/dom/media/test/reftest/reftest.list b/dom/media/test/reftest/reftest.list
index 6bbd7b9a53..0f709a35ee 100644
--- a/dom/media/test/reftest/reftest.list
+++ b/dom/media/test/reftest/reftest.list
@@ -1,12 +1,12 @@
-skip-if(Android) fuzzy-if(OSX,0-80,0-76800) fuzzy-if(appleSilicon,0-80,0-76800) fuzzy-if(winWidget,0-63,0-76799) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-70,0-2032) HTTP(..) == short.mp4.firstframe.html short.mp4.firstframe-ref.html
-skip-if(Android) fuzzy-if(OSX,0-87,0-76797) fuzzy-if(appleSilicon,0-87,0-76797) fuzzy-if(winWidget,0-60,0-76797) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-60,0-6070) HTTP(..) == short.mp4.lastframe.html short.mp4.lastframe-ref.html
-skip-if(Android) skip-if(cocoaWidget) skip-if(winWidget) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-57,0-4282) fuzzy-if(OSX,55-80,4173-4417) HTTP(..) == bipbop_300_215kbps.mp4.lastframe.html bipbop_300_215kbps.mp4.lastframe-ref.html
-skip-if(Android) fuzzy-if(OSX,0-25,0-175921) fuzzy-if(appleSilicon,34-34,40100-40100) fuzzy-if(winWidget,0-71,0-179198) HTTP(..) == gizmo.mp4.seek.html gizmo.mp4.55thframe-ref.html
+skip-if(Android) fuzzy-if(cocoaWidget,0-80,0-76800) fuzzy-if(appleSilicon,0-80,0-76800) fuzzy-if(winWidget,0-63,0-76799) fuzzy-if(gtkWidget,0-70,0-2032) HTTP(..) == short.mp4.firstframe.html short.mp4.firstframe-ref.html
+skip-if(Android) fuzzy-if(cocoaWidget,0-87,0-76797) fuzzy-if(appleSilicon,0-87,0-76797) fuzzy-if(winWidget,0-60,0-76797) fuzzy-if(gtkWidget,0-60,0-6070) HTTP(..) == short.mp4.lastframe.html short.mp4.lastframe-ref.html
+skip-if(Android) skip-if(cocoaWidget) skip-if(winWidget) fuzzy-if(gtkWidget,0-57,0-4282) fuzzy-if(cocoaWidget,55-80,4173-4417) HTTP(..) == bipbop_300_215kbps.mp4.lastframe.html bipbop_300_215kbps.mp4.lastframe-ref.html
+skip-if(Android) fuzzy-if(cocoaWidget,0-25,0-175921) fuzzy-if(appleSilicon,34-34,40100-40100) fuzzy-if(winWidget,0-71,0-179198) HTTP(..) == gizmo.mp4.seek.html gizmo.mp4.55thframe-ref.html
# Bug 1758718
-skip-if(Android) skip-if(MinGW) skip-if(OSX) fuzzy(0-10,0-778236) == image-10bits-rendering-video.html image-10bits-rendering-ref.html
-skip-if(Android) skip-if(MinGW) fuzzy(0-10,0-778536) fuzzy-if(appleSilicon,0-37,0-699614) == image-10bits-rendering-90-video.html image-10bits-rendering-90-ref.html
+skip-if(Android) skip-if(cocoaWidget) fuzzy(0-10,0-778236) == image-10bits-rendering-video.html image-10bits-rendering-ref.html
+skip-if(Android) fuzzy(0-10,0-778536) fuzzy-if(appleSilicon,0-37,0-699614) == image-10bits-rendering-90-video.html image-10bits-rendering-90-ref.html
# Bug 1758718
-skip-if(Android) fuzzy(0-27,0-573106) skip-if(OSX) == image-10bits-rendering-720-video.html image-10bits-rendering-720-ref.html
+skip-if(Android) fuzzy(0-27,0-573106) skip-if(cocoaWidget) == image-10bits-rendering-720-video.html image-10bits-rendering-720-ref.html
skip-if(Android) fuzzy(0-31,0-573249) fuzzy-if(appleSilicon,0-37,0-543189) == image-10bits-rendering-720-90-video.html image-10bits-rendering-720-90-ref.html
skip-if(Android) fuzzy(0-84,0-771156) fails-if(useDrawSnapshot) == uneven_frame_duration_video.html uneven_frame_duration_video-ref.html # Skip on Windows 7 as the resolution of the video is too high for test machines and will fail in the decoder.
# Set media.dormant-on-pause-timeout-ms to avoid decoders becoming dormant and busting test, skip on android as test is too noisy and unstable
diff --git a/dom/media/test/test_arraybuffer.html b/dom/media/test/test_arraybuffer.html
index 9ef84c53dc..146d3ea5ac 100644
--- a/dom/media/test/test_arraybuffer.html
+++ b/dom/media/test/test_arraybuffer.html
@@ -49,14 +49,14 @@ function startTest(test, token) {
events.forEach(function(e) {
v.addEventListener(e, logEvent);
});
- once(v, "stalled", function(e) {
+ once(v, "stalled", function() {
// Resource fetch algorithm in local mode should never fire stalled event.
// https://html.spec.whatwg.org/multipage/media.html#concept-media-load-resource
ok(false, test.name + ": got stalled");
removeNodeAndSource(v);
manager.finished(token);
});
- once(v, "canplaythrough", function(e) {
+ once(v, "canplaythrough", function() {
ok(true, test.name + ": got canplaythrough");
is(v.readyState, v.HAVE_ENOUGH_DATA, test.name + ": readyState is HAVE_ENOUGH_DATA");
removeNodeAndSource(v);
diff --git a/dom/media/test/test_aspectratio_mp4.html b/dom/media/test/test_aspectratio_mp4.html
index 5e01875439..959096e902 100644
--- a/dom/media/test/test_aspectratio_mp4.html
+++ b/dom/media/test/test_aspectratio_mp4.html
@@ -28,7 +28,7 @@ v.onloadedmetadata = function() {
is(v.videoHeight, resource.height, "Intrinsic height should match video height");
SimpleTest.finish();
}
-v.addEventListener("error", function(ev) {
+v.addEventListener("error", function() {
if (v.readyState < v.HAVE_METADATA) {
info("Video element returns with readyState " + v.readyState + " error.code " + v.error.code);
todo(false, "This platform doesn't support to retrieve MP4 metadata.");
diff --git a/dom/media/test/test_background_video_resume_after_end_show_last_frame.html b/dom/media/test/test_background_video_resume_after_end_show_last_frame.html
index 68f7179e12..991de9ac98 100644
--- a/dom/media/test/test_background_video_resume_after_end_show_last_frame.html
+++ b/dom/media/test/test_background_video_resume_after_end_show_last_frame.html
@@ -79,7 +79,7 @@ function waitUntilSeekToLastFrame(video) {
);
}
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
video.seenEnded = false;
video.addEventListener("ended", () => {
video.seenEnded = true;
diff --git a/dom/media/test/test_buffered.html b/dom/media/test/test_buffered.html
index 86d8eec28a..85bbef2189 100644
--- a/dom/media/test/test_buffered.html
+++ b/dom/media/test/test_buffered.html
@@ -74,7 +74,7 @@ function fetch(url, fetched_callback) {
xhr.open("GET", url, true);
xhr.responseType = "blob";
- var loaded = function (event) {
+ var loaded = function () {
if (xhr.status == 200 || xhr.status == 206) {
ok(true, `${url}: Fetch succeeded, status=${xhr.status}`);
// Request fulfilled. Note sometimes we get 206... Presumably because either
diff --git a/dom/media/test/test_bug1431810_opus_downmix_to_mono.html b/dom/media/test/test_bug1431810_opus_downmix_to_mono.html
index 647ddf0489..2d81fba1c7 100644
--- a/dom/media/test/test_bug1431810_opus_downmix_to_mono.html
+++ b/dom/media/test/test_bug1431810_opus_downmix_to_mono.html
@@ -116,14 +116,14 @@ function mediaElementWithPhaseInversionDisabled(audioContext, mediaElement, succ
let ac = new AudioContext();
-function testPhaseInversion(mediaElement) {
- return new Promise((accept, reject) => {
+function testPhaseInversion() {
+ return new Promise((accept) => {
mediaElementWithPhaseInversion(ac, a, accept);
});
}
-function testPhaseInversionDisabled(mediaElement) {
- return new Promise((accept, reject) => {
+function testPhaseInversionDisabled() {
+ return new Promise((accept) => {
mediaElementWithPhaseInversionDisabled(ac, b, accept);
});
}
diff --git a/dom/media/test/test_cueless_webm_seek-1.html b/dom/media/test/test_cueless_webm_seek-1.html
index db58a89665..dbc2933b92 100644
--- a/dom/media/test/test_cueless_webm_seek-1.html
+++ b/dom/media/test/test_cueless_webm_seek-1.html
@@ -101,7 +101,7 @@ function fetch(url, fetched_callback) {
xhr.open("GET", url, true);
xhr.responseType = "blob";
- var loaded = function (event) {
+ var loaded = function () {
if (xhr.status == 200 || xhr.status == 206) {
// Request fulfilled. Note sometimes we get 206... Presumably because either
// httpd.js or Necko cached the result.
diff --git a/dom/media/test/test_cueless_webm_seek-2.html b/dom/media/test/test_cueless_webm_seek-2.html
index 720cc18399..f9fd29fcfb 100644
--- a/dom/media/test/test_cueless_webm_seek-2.html
+++ b/dom/media/test/test_cueless_webm_seek-2.html
@@ -91,7 +91,7 @@ function fetch(url, fetched_callback) {
xhr.open("GET", url, true);
xhr.responseType = "blob";
- var loaded = function (event) {
+ var loaded = function () {
if (xhr.status == 200 || xhr.status == 206) {
// Request fulfilled. Note sometimes we get 206... Presumably because either
// httpd.js or Necko cached the result.
diff --git a/dom/media/test/test_cueless_webm_seek-3.html b/dom/media/test/test_cueless_webm_seek-3.html
index d6e3e50d7d..235066e6eb 100644
--- a/dom/media/test/test_cueless_webm_seek-3.html
+++ b/dom/media/test/test_cueless_webm_seek-3.html
@@ -85,7 +85,7 @@ function fetch(url, fetched_callback) {
xhr.open("GET", url, true);
xhr.responseType = "blob";
- var loaded = function (event) {
+ var loaded = function () {
if (xhr.status == 200 || xhr.status == 206) {
// Request fulfilled. Note sometimes we get 206... Presumably because either
// httpd.js or Necko cached the result.
diff --git a/dom/media/test/test_decode_error_crossorigin.html b/dom/media/test/test_decode_error_crossorigin.html
index 24c1430a5b..8fa3db6c38 100644
--- a/dom/media/test/test_decode_error_crossorigin.html
+++ b/dom/media/test/test_decode_error_crossorigin.html
@@ -19,7 +19,7 @@ function startTest(test, token) {
};
const v = document.createElement("video");
manager.started(token);
- v.addEventListener("error", event => {
+ v.addEventListener("error", () => {
if (v.readyState == v.HAVE_NOTHING) {
is(v.error.code, MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
"Expected code for a load error");
diff --git a/dom/media/test/test_delay_load.html b/dom/media/test/test_delay_load.html
index 05877aa911..6c10e5b957 100644
--- a/dom/media/test/test_delay_load.html
+++ b/dom/media/test/test_delay_load.html
@@ -87,7 +87,7 @@ var w = window.open("", "testWindow", "width=400,height=400");
testWindows.push(w);
v = createVideo(test.name, test.type, "4");
-v.onloadstart = function(e) {
+v.onloadstart = function() {
// Using a new window to do this is a bit annoying, but if we use an iframe here,
// delaying of the iframe's load event might interfere with the firing of our load event
// in some confusing way. So it's simpler just to use another window.
diff --git a/dom/media/test/test_eme_detach_media_keys.html b/dom/media/test/test_eme_detach_media_keys.html
index 69b812032a..5faa68d9c5 100644
--- a/dom/media/test/test_eme_detach_media_keys.html
+++ b/dom/media/test/test_eme_detach_media_keys.html
@@ -15,7 +15,7 @@
SimpleTest.waitForExplicitFinish();
function createAndSet() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var m;
navigator.requestMediaKeySystemAccess(CLEARKEY_KEYSYSTEM, gCencMediaKeySystemConfig)
.then(function (access) {
diff --git a/dom/media/test/test_eme_detach_reattach_same_mediakeys_during_playback.html b/dom/media/test/test_eme_detach_reattach_same_mediakeys_during_playback.html
index e47fae5891..6911ac2da8 100644
--- a/dom/media/test/test_eme_detach_reattach_same_mediakeys_during_playback.html
+++ b/dom/media/test/test_eme_detach_reattach_same_mediakeys_during_playback.html
@@ -72,7 +72,7 @@ function startTest(test, token)
ok(false, " Failed to set original mediakeys back.");
}
- function onCanPlayAgain(ev) {
+ function onCanPlayAgain() {
Promise.all([closeSessions()])
.then(() => {
ok(true, " (ENCRYPTED) Playback can be resumed.");
@@ -91,7 +91,7 @@ function startTest(test, token)
v.currentTime = v.duration / 2;
}
- function onCanPlay(ev) {
+ function onCanPlay() {
function onSetMediaKeysToNullOK() {
ok(true, TimeStamp(token) + " Set MediaKeys to null. OK!");
diff --git a/dom/media/test/test_eme_getstatusforpolicy.html b/dom/media/test/test_eme_getstatusforpolicy.html
index 2031d04df5..6e9503e33a 100644
--- a/dom/media/test/test_eme_getstatusforpolicy.html
+++ b/dom/media/test/test_eme_getstatusforpolicy.html
@@ -68,7 +68,7 @@ add_task(async function testGetStatusForPolicy() {
"Should have set MediaKeys on media element");
let keyStatus = await
video.mediaKeys.getStatusForPolicy({minHdcpVersion : result.minHdcpVersion})
- .catch(e => ok(false, "getStatusForPolicy failed!"));
+ .catch(() => ok(false, "getStatusForPolicy failed!"));
info(`getStatusForPolicy for HDCP ${result.minHdcpVersion} : ${keyStatus}`);
is(keyStatus, result.expectedResult,
`Expected ${result.expectedResult}, got ${keyStatus}`);
diff --git a/dom/media/test/test_eme_initDataTypes.html b/dom/media/test/test_eme_initDataTypes.html
index 587e6fc161..a1e0c15182 100644
--- a/dom/media/test/test_eme_initDataTypes.html
+++ b/dom/media/test/test_eme_initDataTypes.html
@@ -93,7 +93,7 @@ function PrepareInitData(initDataType, initData)
}
function Test(test) {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var configs = [{
initDataTypes: [test.initDataType],
videoCapabilities: [{contentType: 'video/mp4' }],
@@ -113,7 +113,7 @@ function Test(test) {
var initData = PrepareInitData(test.initDataType, test.initData);
return session.generateRequest(test.initDataType, initData);
}
- ).catch((x) => {
+ ).catch(() => {
ok(!test.expectPass, "'" + test.name + "' expected to fail.");
resolve();
});
diff --git a/dom/media/test/test_eme_mfcdm_generate_request.html b/dom/media/test/test_eme_mfcdm_generate_request.html
index 57be325e36..b1b8396c0f 100644
--- a/dom/media/test/test_eme_mfcdm_generate_request.html
+++ b/dom/media/test/test_eme_mfcdm_generate_request.html
@@ -65,11 +65,11 @@ async function testKeySystemRequest(keySystem) {
}];
info(`requestMediaKeySystemAccess for ${keySystem}`);
let access = await navigator.requestMediaKeySystemAccess(keySystem, configs)
- .catch(e => ok(false, `failed to create key system access`));
+ .catch(() => ok(false, `failed to create key system access`));
info('creating media key');
let mediaKeys = await access.createMediaKeys()
- .catch(e => ok(false, `failed to create media key`));;
+ .catch(() => ok(false, `failed to create media key`));;
info(`creating a temporary media key session`);
let session = mediaKeys.createSession(sessionType);
@@ -84,7 +84,7 @@ async function testKeySystemRequest(keySystem) {
await session.generateRequest(
'keyids',
new TextEncoder().encode(fakeKID))
- .catch(e => ok(false, `failed to generate request`));
+ .catch(() => ok(false, `failed to generate request`));
await messagePromise;
}
diff --git a/dom/media/test/test_eme_mfcdm_getstatusforpolicy.html b/dom/media/test/test_eme_mfcdm_getstatusforpolicy.html
index 7e22be25d9..83cd740570 100644
--- a/dom/media/test/test_eme_mfcdm_getstatusforpolicy.html
+++ b/dom/media/test/test_eme_mfcdm_getstatusforpolicy.html
@@ -89,7 +89,7 @@ add_task(async function testGetStatusForPolicy() {
"Should have set MediaKeys on media element");
let keyStatus = await
video.mediaKeys.getStatusForPolicy({minHdcpVersion : result.minHdcpVersion})
- .catch(e => ok(false, "getStatusForPolicy failed!"));
+ .catch(() => ok(false, "getStatusForPolicy failed!"));
info(`getStatusForPolicy for HDCP ${result.minHdcpVersion} : ${keyStatus}`);
is(keyStatus, result.expectedResult,
`Expected ${result.expectedResult}, got ${keyStatus}`);
diff --git a/dom/media/test/test_eme_missing_pssh.html b/dom/media/test/test_eme_missing_pssh.html
index 29f77d021a..cb94ffbf23 100644
--- a/dom/media/test/test_eme_missing_pssh.html
+++ b/dom/media/test/test_eme_missing_pssh.html
@@ -63,7 +63,7 @@
}
function DownloadMedia(url, type, mediaSource) {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var sourceBuffer = mediaSource.addSourceBuffer(type);
fetchWithXHR(url, (response) => {
once(sourceBuffer, "updateend", resolve);
diff --git a/dom/media/test/test_eme_non_mse_fails.html b/dom/media/test/test_eme_non_mse_fails.html
index 6ff17d59ff..e2719f244c 100644
--- a/dom/media/test/test_eme_non_mse_fails.html
+++ b/dom/media/test/test_eme_non_mse_fails.html
@@ -65,7 +65,7 @@ function TestSetSrc(test, token)
manager.started(token);
var v = document.createElement("video");
- v.addEventListener("error", function(err) {
+ v.addEventListener("error", function() {
ok(true, token + " got error setting src on video element, as expected");
manager.finished(token);
});
diff --git a/dom/media/test/test_eme_playback.html b/dom/media/test/test_eme_playback.html
index bcfa058e34..478b7b0a25 100644
--- a/dom/media/test/test_eme_playback.html
+++ b/dom/media/test/test_eme_playback.html
@@ -109,7 +109,7 @@ function startTest(test, token)
var gotEncrypted = 0;
let finish = new EMEPromise;
- v.addEventListener("encrypted", function(ev) {
+ v.addEventListener("encrypted", function() {
gotEncrypted += 1;
});
@@ -119,7 +119,7 @@ function startTest(test, token)
is(v.isEncrypted, undefined, "isEncrypted should not be accessible from content");
});
- v.addEventListener("ended", function(ev) {
+ v.addEventListener("ended", function() {
ok(true, TimeStamp(token) + " got ended event");
is(gotEncrypted, test.sessionCount,
diff --git a/dom/media/test/test_eme_protection_query.html b/dom/media/test/test_eme_protection_query.html
index 8bf97d8100..a8a1c7b376 100644
--- a/dom/media/test/test_eme_protection_query.html
+++ b/dom/media/test/test_eme_protection_query.html
@@ -53,7 +53,7 @@ async function setupEme(video) {
let session = video.mediaKeys.createSession();
video.onencrypted = async encryptedEvent => {
- session.onmessage = messageEvent => {
+ session.onmessage = () => {
// Handle license messages. Hard code the license because we always test
// with the same file and we know what the license should be.
const license = {
diff --git a/dom/media/test/test_eme_pssh_in_moof.html b/dom/media/test/test_eme_pssh_in_moof.html
index d1965be844..406600056e 100644
--- a/dom/media/test/test_eme_pssh_in_moof.html
+++ b/dom/media/test/test_eme_pssh_in_moof.html
@@ -61,7 +61,7 @@
// Specialized create media keys function, since the one in eme.js relies
// on listening for encrypted events, and we want to manage those
// ourselves within this test.
- async function createAndSetMediaKeys(video, test, token) {
+ async function createAndSetMediaKeys(video, test) {
function streamType(type) {
var x = test.tracks.find(o => o.name == type);
return x ? x.type : undefined;
diff --git a/dom/media/test/test_eme_requestKeySystemAccess.html b/dom/media/test/test_eme_requestKeySystemAccess.html
index b044fe8c84..4014ef937a 100644
--- a/dom/media/test/test_eme_requestKeySystemAccess.html
+++ b/dom/media/test/test_eme_requestKeySystemAccess.html
@@ -20,7 +20,7 @@ function ValidateConfig(name, expected, observed) {
is(observed.label, expected.label, name + " label should match");
if (expected.initDataTypes) {
- ok(expected.initDataTypes.every((element, index, array) => observed.initDataTypes.includes(element)), name + " initDataTypes should match.");
+ ok(expected.initDataTypes.every((element) => observed.initDataTypes.includes(element)), name + " initDataTypes should match.");
}
if (expected.audioCapabilities) {
@@ -45,7 +45,7 @@ function ValidateConfig(name, expected, observed) {
function Test(test) {
var name = "'" + test.name + "'";
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var p;
if (test.options) {
var keySystem = (test.keySystem !== undefined) ? test.keySystem : CLEARKEY_KEYSYSTEM;
diff --git a/dom/media/test/test_eme_request_notifications.html b/dom/media/test/test_eme_request_notifications.html
index 6c44f892a6..62ef28e57d 100644
--- a/dom/media/test/test_eme_request_notifications.html
+++ b/dom/media/test/test_eme_request_notifications.html
@@ -17,7 +17,7 @@ function SetPrefs(prefs) {
}
function observe() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var observer = function(subject, topic, data) {
SpecialPowers.Services.obs.removeObserver(observer, "mediakeys-request");
resolve(JSON.parse(data).status);
@@ -70,7 +70,7 @@ var tests = [
SimpleTest.waitForExplicitFinish();
tests
- .reduce(function(p, c, i, array) {
+ .reduce(function(p, c) {
return p.then(function() {
return Test(c);
});
diff --git a/dom/media/test/test_eme_sample_groups_playback.html b/dom/media/test/test_eme_sample_groups_playback.html
index cef1e26b33..e1e09ad73d 100644
--- a/dom/media/test/test_eme_sample_groups_playback.html
+++ b/dom/media/test/test_eme_sample_groups_playback.html
@@ -81,7 +81,7 @@
});
var request = new TextEncoder().encode(json);
session.generateRequest("keyids", request)
- .then(e => {
+ .then(() => {
Log(test.name, "Request license success");
}, reason => {
Log("Request license failed! " + reason);
@@ -90,7 +90,7 @@
}
function DownloadMedia(url, type, mediaSource) {
- return new Promise((resolve, reject) => {
+ return new Promise((resolve) => {
var sourceBuffer = mediaSource.addSourceBuffer(type);
fetchWithXHR(url, (response) => {
once(sourceBuffer, "updateend", resolve);
diff --git a/dom/media/test/test_eme_stream_capture_blocked_case1.html b/dom/media/test/test_eme_stream_capture_blocked_case1.html
index 0fc8d28364..e6743b4f8a 100644
--- a/dom/media/test/test_eme_stream_capture_blocked_case1.html
+++ b/dom/media/test/test_eme_stream_capture_blocked_case1.html
@@ -35,7 +35,7 @@ function startTest(test, token)
var context = new AudioContext();
context.createMediaElementSource(v1);
- v1.addEventListener("loadeddata", function(ev) {
+ v1.addEventListener("loadeddata", function() {
ok(false, TimeStamp(case1token) + " should never reach loadeddata, as setMediaKeys should fail");
});
diff --git a/dom/media/test/test_eme_stream_capture_blocked_case2.html b/dom/media/test/test_eme_stream_capture_blocked_case2.html
index b60538caf0..6ee415c124 100644
--- a/dom/media/test/test_eme_stream_capture_blocked_case2.html
+++ b/dom/media/test/test_eme_stream_capture_blocked_case2.html
@@ -20,7 +20,7 @@ function startTest(test, token)
var case2token = token + "_case2";
let v2 = document.createElement("video");
- v2.addEventListener("loadeddata", function(ev) {
+ v2.addEventListener("loadeddata", function() {
ok(true, case2token + " should reach loadeddata");
var threw = false;
try {
diff --git a/dom/media/test/test_eme_stream_capture_blocked_case3.html b/dom/media/test/test_eme_stream_capture_blocked_case3.html
index e25a900956..23a23542e9 100644
--- a/dom/media/test/test_eme_stream_capture_blocked_case3.html
+++ b/dom/media/test/test_eme_stream_capture_blocked_case3.html
@@ -19,7 +19,7 @@ function startTest(test, token)
var case3token = token + "_case3";
let v3 = document.createElement("video");
- v3.addEventListener("loadeddata", function(ev) {
+ v3.addEventListener("loadeddata", function() {
ok(true, TimeStamp(case3token) + " should reach loadeddata");
var threw = false;
try {
diff --git a/dom/media/test/test_eme_unsetMediaKeys_then_capture.html b/dom/media/test/test_eme_unsetMediaKeys_then_capture.html
index 3ecdc79dbf..eb20f2bee2 100644
--- a/dom/media/test/test_eme_unsetMediaKeys_then_capture.html
+++ b/dom/media/test/test_eme_unsetMediaKeys_then_capture.html
@@ -36,11 +36,11 @@ function startTest(test, token)
let finish = new EMEPromise;
- function onVideoEnded(ev) {
+ function onVideoEnded() {
ok(true, TimeStamp(token) + " (ENCRYPTED) content playback ended.");
function playClearVideo() {
- var p1 = once(v, 'loadeddata', (e) => {
+ var p1 = once(v, 'loadeddata', () => {
ok(true, TimeStamp(token) + " Receiving event 'loadeddata' for (CLEAR) content.");
let canvasElem = document.createElement('canvas');
document.body.appendChild(canvasElem);
diff --git a/dom/media/test/test_eme_wideinve_l1_installation.html b/dom/media/test/test_eme_wideinve_l1_installation.html
index fa6a0c350b..da1f1ab0f9 100644
--- a/dom/media/test/test_eme_wideinve_l1_installation.html
+++ b/dom/media/test/test_eme_wideinve_l1_installation.html
@@ -19,7 +19,7 @@ function SetPrefs(prefs) {
}
function observe() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var observer = function(subject, topic, data) {
SpecialPowers.Services.obs.removeObserver(observer, "mediakeys-request");
resolve(JSON.parse(data).status);
@@ -74,7 +74,7 @@ const tests = [
},
];
-tests.reduce(function(p, c, i, array) {
+tests.reduce(function(p, c) {
return p.then(function() {
return Test(c);
});
diff --git a/dom/media/test/test_eme_wv_privacy.html b/dom/media/test/test_eme_wv_privacy.html
index a050d2a528..e18d31a36f 100644
--- a/dom/media/test/test_eme_wv_privacy.html
+++ b/dom/media/test/test_eme_wv_privacy.html
@@ -12,7 +12,7 @@
<script class="testbody" type="text/javascript">
function Test() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var configs = [{
initDataTypes: ['keyids'],
videoCapabilities: [{contentType: 'video/mp4' }],
diff --git a/dom/media/test/test_hls_player_independency.html b/dom/media/test/test_hls_player_independency.html
index cea5c140ed..ed2d5cee52 100644
--- a/dom/media/test/test_hls_player_independency.html
+++ b/dom/media/test/test_hls_player_independency.html
@@ -27,12 +27,12 @@ function startTest() {
var v4x3 = document.getElementById('player4x3');
var v16x9 = document.getElementById('player16x9');
- var p1 = once(v4x3, 'ended', function onended(e) {
+ var p1 = once(v4x3, 'ended', function onended() {
is(v4x3.videoWidth, 400, "4x3 content, the width should be 400.");
is(v4x3.videoHeight, 300, "4x3 content, the height should be 300.");
});
- var p2 = once(v16x9, 'ended', function onended(e) {
+ var p2 = once(v16x9, 'ended', function onended() {
is(v16x9.videoWidth, 416, "16x9 content, the width should be 416.");
is(v16x9.videoHeight, 234, "16x9 content, the height should be 234.");
});
diff --git a/dom/media/test/test_hw_video_decoding.html b/dom/media/test/test_hw_video_decoding.html
index f93ab9b0a8..43ac27bf71 100644
--- a/dom/media/test/test_hw_video_decoding.html
+++ b/dom/media/test/test_hw_video_decoding.html
@@ -24,7 +24,10 @@ const PLATFORMS = {
// file: "gizmo.webm",
// decoder: "wmf VP9 codec hardware video decoder",
// },
- // TODO : add AV1, see bug 1861501.
+ {
+ file: "av1.mp4",
+ decoder: "wmf AV1 codec hardware video decoder",
+ },
],
},
Darwin: {
diff --git a/dom/media/test/test_invalid_reject.html b/dom/media/test/test_invalid_reject.html
index 583847fe12..4023642632 100644
--- a/dom/media/test/test_invalid_reject.html
+++ b/dom/media/test/test_invalid_reject.html
@@ -18,7 +18,7 @@ function startTest(test, token) {
manager.started(token);
// Set up event handlers. Seeing any of these is a failure.
- function badEvent(type) { return function(e) {
+ function badEvent(type) { return function() {
ok(false, test.name + " should not fire '" + type + "' event");
}};
var events = [
@@ -31,7 +31,7 @@ function startTest(test, token) {
});
// Seeing a decoder error is a success.
- v.addEventListener("error", function onerror(e) {
+ v.addEventListener("error", function onerror() {
if (v.readyState == v.HAVE_NOTHING) {
is(v.error.code, v.error.MEDIA_ERR_SRC_NOT_SUPPORTED,
"decoder should reject " + test.name);
diff --git a/dom/media/test/test_invalid_reject_play.html b/dom/media/test/test_invalid_reject_play.html
index 3e658f94b8..bbfbbc34cc 100644
--- a/dom/media/test/test_invalid_reject_play.html
+++ b/dom/media/test/test_invalid_reject_play.html
@@ -18,14 +18,14 @@ function startTest(test, token) {
manager.started(token);
// Seeing a decoder error is a success.
- v.addEventListener("error", function onerror(e) {
+ v.addEventListener("error", function onerror() {
is(v.error.code, v.error.MEDIA_ERR_DECODE,
"decoder should reject " + test.name);
v.removeEventListener("error", onerror);
manager.finished(token);
});
- v.addEventListener("ended", function onended(e) {
+ v.addEventListener("ended", function onended() {
ok(false, "decoder should have rejected file before playback ended");
v.removeEventListener("ended", onended);
manager.finished(token);
diff --git a/dom/media/test/test_load.html b/dom/media/test/test_load.html
index de8fd63948..a502a6b23a 100644
--- a/dom/media/test/test_load.html
+++ b/dom/media/test/test_load.html
@@ -18,7 +18,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=479859
<pre id="test">
<script type="text/javascript">
-function log(msg) {
+function log() {
//document.getElementById('log').innerHTML += "<p>" + msg + "</p>";
}
@@ -89,7 +89,7 @@ function prependSource(src, type) {
var gTests = [
{
// Test 0: adding video to doc, then setting src should load implicitly.
- create(src, type) {
+ create(src) {
document.body.appendChild(gMedia);
gMedia.src = src;
},
@@ -126,7 +126,7 @@ var gTests = [
addSource("404a", type);
var s2 = addSource("404b", type);
s2.addEventListener("error",
- function(e) {
+ function() {
// Should awaken waiting load, causing successful load.
addSource(src, type);
});
@@ -143,7 +143,7 @@ var gTests = [
addSource("404a", type);
var s2 = addSource("404b", type);
s2.addEventListener("error",
- function(e) {
+ function() {
// Should awaken waiting load, causing successful load.
if (!prepended) {
prependSource(src, type);
diff --git a/dom/media/test/test_load_source.html b/dom/media/test/test_load_source.html
index 95a925b61f..0792bb924b 100644
--- a/dom/media/test/test_load_source.html
+++ b/dom/media/test/test_load_source.html
@@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=534571
var v = null;
var s = null;
-function finish(event) {
+function finish() {
ok(true, "Should have played both videos");
SimpleTest.finish();
}
@@ -34,7 +34,7 @@ function finish(event) {
var first = null;
var second = null;
-function ended(event) {
+function ended() {
s.type = second.type;
s.src = second.name;
v.removeEventListener("ended", ended);
diff --git a/dom/media/test/test_media_selection.html b/dom/media/test/test_media_selection.html
index 42f5a9bd43..33ecabfd58 100644
--- a/dom/media/test/test_media_selection.html
+++ b/dom/media/test/test_media_selection.html
@@ -32,7 +32,7 @@ function maketest(attach_media, name, type, check_metadata) {
manager.finished(token);
});
} else {
- e.addEventListener('error', function onerror(event) {
+ e.addEventListener('error', function onerror() {
is(errorRun, false, "error handler should run once only!");
errorRun = true;
is(e.readyState, HTMLMediaElement.HAVE_NOTHING,
@@ -46,7 +46,7 @@ function maketest(attach_media, name, type, check_metadata) {
}
}
-function set_src(element, name, type) {
+function set_src(element, name) {
element.src = name;
document.body.appendChild(element);
}
diff --git a/dom/media/test/test_mediarecorder_record_canvas_captureStream.html b/dom/media/test/test_mediarecorder_record_canvas_captureStream.html
index 0b6cd6dbb5..d80a06e8ff 100644
--- a/dom/media/test/test_mediarecorder_record_canvas_captureStream.html
+++ b/dom/media/test/test_mediarecorder_record_canvas_captureStream.html
@@ -51,7 +51,7 @@ function startTest() {
video.id = "recorded-video";
video.src = URL.createObjectURL(blob);
video.play();
- video.onerror = err => {
+ video.onerror = () => {
ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
SimpleTest.finish();
};
diff --git a/dom/media/test/test_mediarecorder_record_changing_video_resolution.html b/dom/media/test/test_mediarecorder_record_changing_video_resolution.html
index d6354ee5a1..b4e3a6a3fb 100644
--- a/dom/media/test/test_mediarecorder_record_changing_video_resolution.html
+++ b/dom/media/test/test_mediarecorder_record_changing_video_resolution.html
@@ -70,7 +70,7 @@ function startTest() {
video.src = URL.createObjectURL(blob);
video.preload = "metadata";
- video.onerror = err => {
+ video.onerror = () => {
ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
SimpleTest.finish();
};
diff --git a/dom/media/test/test_mediarecorder_record_downsize_resolution.html b/dom/media/test/test_mediarecorder_record_downsize_resolution.html
index f9422a3897..5e2fbd13c1 100644
--- a/dom/media/test/test_mediarecorder_record_downsize_resolution.html
+++ b/dom/media/test/test_mediarecorder_record_downsize_resolution.html
@@ -64,7 +64,7 @@ function startTest() {
var video = document.createElement("video");
video.id = "recorded-video";
video.src = URL.createObjectURL(blob);
- video.onerror = err => {
+ video.onerror = () => {
ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
SimpleTest.finish();
};
diff --git a/dom/media/test/test_mediarecorder_record_gum_video_timeslice.html b/dom/media/test/test_mediarecorder_record_gum_video_timeslice.html
index 961a9644b2..7c70ddf49d 100644
--- a/dom/media/test/test_mediarecorder_record_gum_video_timeslice.html
+++ b/dom/media/test/test_mediarecorder_record_gum_video_timeslice.html
@@ -53,7 +53,7 @@ async function startTest() {
// We'll stop recording upon the 1st blob being received
if (dataAvailableCount === 1) {
- mediaRecorder.onstop = function (event) {
+ mediaRecorder.onstop = function () {
info('onstop fired');
if (!onDataAvailableFirst) {
diff --git a/dom/media/test/test_mediarecorder_record_session.html b/dom/media/test/test_mediarecorder_record_session.html
index 88795d82d0..a14d3c2819 100644
--- a/dom/media/test/test_mediarecorder_record_session.html
+++ b/dom/media/test/test_mediarecorder_record_session.html
@@ -44,7 +44,7 @@ function startTest(test, token) {
}
// data avaliable.
- mediaRecorder.ondataavailable = function(evt) {}
+ mediaRecorder.ondataavailable = function() {}
mediaRecorder.onerror = function(err) {
ok(false, 'Unexpected error fired with:' + err);
diff --git a/dom/media/test/test_mediarecorder_record_startstopstart.html b/dom/media/test/test_mediarecorder_record_startstopstart.html
index b4cc62c709..2556072979 100644
--- a/dom/media/test/test_mediarecorder_record_startstopstart.html
+++ b/dom/media/test/test_mediarecorder_record_startstopstart.html
@@ -18,7 +18,7 @@ function startTest() {
var stopCount = 0;
var dataavailable = 0;
var expectedMimeType = 'audio/ogg; codecs=opus';
- recorder.onstop = function (e) {
+ recorder.onstop = function () {
info('onstop fired');
is(recorder.stream, dest.stream,
'Media recorder stream = element stream post recording');
@@ -45,7 +45,7 @@ function startTest() {
}
dataavailable++;
}
- recorder.onerror = function (e) {
+ recorder.onerror = function () {
ok(false, 'it should execute normally without exception');
}
recorder.onwarning = function() {
diff --git a/dom/media/test/test_mediarecorder_record_timeslice.html b/dom/media/test/test_mediarecorder_record_timeslice.html
index 3e547e77b4..b122c45df5 100644
--- a/dom/media/test/test_mediarecorder_record_timeslice.html
+++ b/dom/media/test/test_mediarecorder_record_timeslice.html
@@ -68,7 +68,7 @@ function startTest(test, token) {
// We'll stop recording upon the 1st blob being received
if (dataAvailableCount === 1) {
- mediaRecorder.onstop = function (event) {
+ mediaRecorder.onstop = function () {
info('onstop fired');
if (!onDataAvailableFirst) {
diff --git a/dom/media/test/test_mediarecorder_record_upsize_resolution.html b/dom/media/test/test_mediarecorder_record_upsize_resolution.html
index d02fd08e44..81a761479c 100644
--- a/dom/media/test/test_mediarecorder_record_upsize_resolution.html
+++ b/dom/media/test/test_mediarecorder_record_upsize_resolution.html
@@ -64,7 +64,7 @@ function startTest() {
var video = document.createElement("video");
video.id = "recorded-video";
video.src = URL.createObjectURL(blob);
- video.onerror = err => {
+ video.onerror = () => {
ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
SimpleTest.finish();
};
diff --git a/dom/media/test/test_mediatrack_consuming_mediaresource.html b/dom/media/test/test_mediatrack_consuming_mediaresource.html
index 515df5c053..052b7cb667 100644
--- a/dom/media/test/test_mediatrack_consuming_mediaresource.html
+++ b/dom/media/test/test_mediatrack_consuming_mediaresource.html
@@ -29,27 +29,27 @@ function startTest(test, token) {
isnot(element.videoTracks, undefined,
'HTMLMediaElement::VideoTracks() property should be available.');
- element.audioTracks.onaddtrack = function(e) {
+ element.audioTracks.onaddtrack = function() {
audioOnaddtrack++;
}
- element.audioTracks.onremovetrack = function(e) {
+ element.audioTracks.onremovetrack = function() {
audioOnremovetrack++;
}
- element.audioTracks.onchange = function(e) {
+ element.audioTracks.onchange = function() {
audioOnchange++;
}
- element.videoTracks.onaddtrack = function(e) {
+ element.videoTracks.onaddtrack = function() {
videoOnaddtrack++;
}
- element.videoTracks.onremovetrack = function(e) {
+ element.videoTracks.onremovetrack = function() {
videoOnremovetrack++;
}
- element.videoTracks.onchange = function(e) {
+ element.videoTracks.onchange = function() {
videoOnchange++;
}
diff --git a/dom/media/test/test_mediatrack_consuming_mediastream.html b/dom/media/test/test_mediatrack_consuming_mediastream.html
index b930ca4fdc..79464ef28d 100644
--- a/dom/media/test/test_mediatrack_consuming_mediastream.html
+++ b/dom/media/test/test_mediatrack_consuming_mediastream.html
@@ -28,19 +28,19 @@ async function startTest() {
return;
}
- element.audioTracks.onaddtrack = function(e) {
+ element.audioTracks.onaddtrack = function() {
audioOnaddtrack++;
};
- element.audioTracks.onchange = function(e) {
+ element.audioTracks.onchange = function() {
audioOnchange++;
};
- element.videoTracks.onaddtrack = function(e) {
+ element.videoTracks.onaddtrack = function() {
videoOnaddtrack++;
};
- element.videoTracks.onchange = function(e) {
+ element.videoTracks.onchange = function() {
videoOnchange++;
};
diff --git a/dom/media/test/test_mediatrack_replay_from_end.html b/dom/media/test/test_mediatrack_replay_from_end.html
index 16b0cbeb97..143ae42668 100644
--- a/dom/media/test/test_mediatrack_replay_from_end.html
+++ b/dom/media/test/test_mediatrack_replay_from_end.html
@@ -34,19 +34,19 @@ function startTest(test, token) {
let isPlaying = false;
let steps = 0;
- element.audioTracks.onaddtrack = function(e) {
+ element.audioTracks.onaddtrack = function() {
audioOnaddtrack++;
}
- element.audioTracks.onremovetrack = function(e) {
+ element.audioTracks.onremovetrack = function() {
audioOnremovetrack++;
}
- element.videoTracks.onaddtrack = function(e) {
+ element.videoTracks.onaddtrack = function() {
videoOnaddtrack++;
}
- element.videoTracks.onremovetrack = function(e) {
+ element.videoTracks.onremovetrack = function() {
videoOnremovetrack++;
}
diff --git a/dom/media/test/test_midflight_redirect_blocked.html b/dom/media/test/test_midflight_redirect_blocked.html
index ea85673b45..24c5a96bd3 100644
--- a/dom/media/test/test_midflight_redirect_blocked.html
+++ b/dom/media/test/test_midflight_redirect_blocked.html
@@ -12,7 +12,7 @@
<script class="testbody" type='application/javascript'>
function testIfLoadsToMetadata(test, useCors) {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var elemType = getMajorMimeType(test.type);
var element = document.createElement(elemType);
diff --git a/dom/media/test/test_mixed_principals.html b/dom/media/test/test_mixed_principals.html
index c1deaef697..88523dabc7 100644
--- a/dom/media/test/test_mixed_principals.html
+++ b/dom/media/test/test_mixed_principals.html
@@ -46,7 +46,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=489415
}
function runTest(origin, shouldReadBackOnLoad) {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
// Load will redirect mid-flight, which will be detected and should error,
// and we should no longer be able to readback.
var video = document.createElement("video");
diff --git a/dom/media/test/test_new_audio.html b/dom/media/test/test_new_audio.html
index e1f8964f73..5e94bf9055 100644
--- a/dom/media/test/test_new_audio.html
+++ b/dom/media/test/test_new_audio.html
@@ -33,7 +33,7 @@ function startTest(test, token) {
a.autoplay = true;
document.body.appendChild(a);
a.addEventListener("ended",
- function(e){
+ function(){
ok(true, "[" + a.src + "]We should get to the end. Oh look we did.");
a.remove();
manager.finished(token);
diff --git a/dom/media/test/test_periodic_timeupdate.html b/dom/media/test/test_periodic_timeupdate.html
index 5d40c7e38a..9933e3d5dc 100644
--- a/dom/media/test/test_periodic_timeupdate.html
+++ b/dom/media/test/test_periodic_timeupdate.html
@@ -36,7 +36,7 @@ add_task(async function testPeriodicTimeupdateShouldOnlyBeDispatchedOnceWithin25
info(`seeking ends`);
video._ignoreEvents = false;
}
- function checkTimeupdate(event) {
+ function checkTimeupdate() {
// When reaching to the end, video would perform a seek to the start
// position where one mandatory `timeupdate` would be dispatched.
if (video._ignoreEvents) {
diff --git a/dom/media/test/test_play_twice.html b/dom/media/test/test_play_twice.html
index e94f28a031..ebe6e323b6 100644
--- a/dom/media/test/test_play_twice.html
+++ b/dom/media/test/test_play_twice.html
@@ -25,7 +25,7 @@ function startTest(test, token) {
checkMetadata(t.name, v, test);
}}(test, video);
- var noLoad = function(t, v) { return function() {
+ var noLoad = function(t) { return function() {
ok(false, t.name + " should not fire 'load' event");
}}(test, video);
diff --git a/dom/media/test/test_playback.html b/dom/media/test/test_playback.html
index 5e28861e93..2f16020059 100644
--- a/dom/media/test/test_playback.html
+++ b/dom/media/test/test_playback.html
@@ -35,7 +35,7 @@ function startTest(test, token) {
checkMetadata(t.name, v, t);
}}(test, video);
- var noLoad = function(t, v) { return function() {
+ var noLoad = function(t) { return function() {
ok(false, t.name + " should not fire 'load' event");
}}(test, video);
diff --git a/dom/media/test/test_playback_errors.html b/dom/media/test/test_playback_errors.html
index 7b3f046099..73d250b5aa 100644
--- a/dom/media/test/test_playback_errors.html
+++ b/dom/media/test/test_playback_errors.html
@@ -24,7 +24,7 @@ function startTest(test, token) {
v.remove();
manager.finished(token);
}
- var checkError = function(t, v) { return function(evt) {
+ var checkError = function(t, v) { return function() {
v._errorCount++;
is(v._errorCount, 1, t.name + " only one error fired");
endedTest(v);
diff --git a/dom/media/test/test_playback_hls.html b/dom/media/test/test_playback_hls.html
index 7d5c777fc1..0d160e9264 100644
--- a/dom/media/test/test_playback_hls.html
+++ b/dom/media/test/test_playback_hls.html
@@ -34,7 +34,7 @@ function startTest(test, token) {
checkMetadata(t.name, v, t);
}}(test, video);
- var noLoad = function(t, v) { return function() {
+ var noLoad = function(t) { return function() {
ok(false, t.name + " should not fire 'load' event");
}}(test, video);
diff --git a/dom/media/test/test_preload_actions.html b/dom/media/test/test_preload_actions.html
index d027147c71..bc1e94d2a9 100644
--- a/dom/media/test/test_preload_actions.html
+++ b/dom/media/test/test_preload_actions.html
@@ -79,8 +79,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
v.src = test.name;
document.body.appendChild(v); // Causes implicit load, which will be halted due to preload:none.
@@ -105,8 +105,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "metadata";
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("loadeddata", this.loadeddata);
v.src = test.name;
document.body.appendChild(v); // Causes implicit load, which will be halted after
@@ -128,8 +128,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "auto";
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("canplaythrough", this.canplaythrough);
v.src = test.name; // Causes implicit load.
document.body.appendChild(v);
@@ -163,8 +163,8 @@ var tests = [
v._gotLoadedMetaData = false;
v._gotSuspend = false;
v.preload = "none";
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
v.addEventListener("ended", this.ended);
v.src = test.name;
@@ -190,8 +190,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
document.body.appendChild(v); // Causes implicit load, which will be halted due to no resource.
v.src = test.name; // Load should start, and halt at preload:none.
@@ -216,8 +216,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
document.body.appendChild(v); // Causes implicit load, which will be halted due to no resource.
var s = document.createElement("source");
@@ -256,14 +256,14 @@ var tests = [
v._gotLoadedMetaData = false;
v.preload = "none";
v._gotErrorEvent = false;
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
v.addEventListener("ended", this.ended);
var s1 = document.createElement("source");
s1.src = "not-a-real-file.404"
s1.type = test.type;
- s1.addEventListener("error", function(e){v._gotErrorEvent = true;});
+ s1.addEventListener("error", function(){v._gotErrorEvent = true;});
v.appendChild(s1);
var s2 = document.createElement("source");
s2.src = test.name;
@@ -288,8 +288,8 @@ var tests = [
setup(v) {
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadstart", function(e){v.preload = "metadata";});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v.preload = "metadata";});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("loadeddata", this.loadeddata);
v.src = test.name; // Causes implicit load.
document.body.appendChild(v);
@@ -333,8 +333,8 @@ var tests = [
setup(v) {
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadstart", function(e){v.preload = "auto";});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v.preload = "auto";});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("canplaythrough", this.canplaythrough);
v.src = test.name; // Causes implicit load.
document.body.appendChild(v);
@@ -356,8 +356,8 @@ var tests = [
setup(v) {
v._gotLoadedMetaData = false;
v.preload = "none";
- v.addEventListener("loadstart", function(e){v.preload = "metadata";});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v.preload = "metadata";});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("loadeddata", this.loadeddata);
v.src = test.name; // Causes implicit load.
document.body.appendChild(v);
@@ -384,8 +384,8 @@ var tests = [
v.preload = "auto";
v.src = test.name;
v.preload = "none";
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
v.addEventListener("suspend", this.suspend);
document.body.appendChild(v); // Causes implicit load, should load according to preload none
document.createElement("source");
@@ -415,8 +415,8 @@ var tests = [
v._gotLoadStart = false;
v._gotLoadedMetaData = false;
v.preload = "metadata";
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("ended", this.ended);
v.addEventListener("loadeddata", this.loadeddata);
v.src = test.name;
@@ -439,8 +439,8 @@ var tests = [
v._gotLoadedMetaData = false;
v.preload = "none";
v.autoplay = true;
- v.addEventListener("loadstart", function(e){v._gotLoadStart = true;});
- v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;});
+ v.addEventListener("loadstart", function(){v._gotLoadStart = true;});
+ v.addEventListener("loadedmetadata", function(){v._gotLoadedMetaData = true;});
v.addEventListener("ended", this.ended);
v.src = test.name; // Causes implicit load.
document.body.appendChild(v);
diff --git a/dom/media/test/test_preload_suspend.html b/dom/media/test/test_preload_suspend.html
index 7f1146360f..b715a58dc8 100644
--- a/dom/media/test/test_preload_suspend.html
+++ b/dom/media/test/test_preload_suspend.html
@@ -85,7 +85,7 @@ var tests = [
}
];
-function startTest(test, token) {
+function startTest(test) {
var v = document.createElement("video");
v.name = test.name;
var key = Math.random();
diff --git a/dom/media/test/test_reset_events_async.html b/dom/media/test/test_reset_events_async.html
index 482ec55986..98010cd475 100644
--- a/dom/media/test/test_reset_events_async.html
+++ b/dom/media/test/test_reset_events_async.html
@@ -23,10 +23,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=975270
is(a.networkState, HTMLMediaElement.NETWORK_EMPTY, "Shouldn't be loading");
- a.addEventListener("abort", function(e) { a._abort++; });
- a.addEventListener("emptied", function(e) { a._emptied++; });
+ a.addEventListener("abort", function() { a._abort++; });
+ a.addEventListener("emptied", function() { a._emptied++; });
a.addEventListener("loadedmetadata",
- function(e) {
+ function() {
is(a._abort, 0, "Should not have received 'abort' before 'loadedmetadata");
is(a._emptied, 0, "Should not have received 'emptied' before 'loadedmetadata");
diff --git a/dom/media/test/test_seek-10.html b/dom/media/test/test_seek-10.html
index 6c02384ed4..63bb47f52a 100644
--- a/dom/media/test/test_seek-10.html
+++ b/dom/media/test/test_seek-10.html
@@ -31,7 +31,7 @@ function startTest() {
v.currentTime = v.duration * 0.9;
}
-function done(evt) {
+function done() {
ok(true, "We don't acutally test anything...");
finish();
}
diff --git a/dom/media/test/test_seekToNextFrame.html b/dom/media/test/test_seekToNextFrame.html
index 755d06e622..fc00d91389 100644
--- a/dom/media/test/test_seekToNextFrame.html
+++ b/dom/media/test/test_seekToNextFrame.html
@@ -46,7 +46,7 @@ function startTest(test, token) {
);
}
- var onLoadedmetadata = function(t, v) { return function() {
+ var onLoadedmetadata = function() { return function() {
callSeekToNextFrame();
}}(test, video);
diff --git a/dom/media/test/test_temporary_file_blob_video_plays.html b/dom/media/test/test_temporary_file_blob_video_plays.html
index 87f6b3c4e6..09ff377c43 100644
--- a/dom/media/test/test_temporary_file_blob_video_plays.html
+++ b/dom/media/test/test_temporary_file_blob_video_plays.html
@@ -51,7 +51,7 @@ function startTest() {
video.id = "recorded-video";
video.src = URL.createObjectURL(blob);
video.play();
- video.onerror = err => {
+ video.onerror = () => {
ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
SimpleTest.finish();
};
diff --git a/dom/media/test/test_video_dimensions.html b/dom/media/test/test_video_dimensions.html
index 4d9c2a185f..facd504ac5 100644
--- a/dom/media/test/test_video_dimensions.html
+++ b/dom/media/test/test_video_dimensions.html
@@ -65,7 +65,7 @@ var startTest = function(test, token) {
manager.finished(token);
}
};
- var setupElement = function(v, id) {
+ var setupElement = function(v) {
v.durationchange = false;
v.ondurationchange = ondurationchange;
v.resize = false;
diff --git a/dom/media/test/test_video_low_power_telemetry.html b/dom/media/test/test_video_low_power_telemetry.html
index be609f7ceb..25a5ce21a6 100644
--- a/dom/media/test/test_video_low_power_telemetry.html
+++ b/dom/media/test/test_video_low_power_telemetry.html
@@ -124,7 +124,7 @@ steps we run before each video. We keep track of which test we are running with
}
}
- async function doPostTest(v) {
+ async function doPostTest() {
info(`Test ${testIndex} attempting to retrieve telemetry.`);
let snap = await retrieveSnapshotAndClearTelemetry();
ok(snap, `Test ${testIndex} should have telemetry.`);