Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D94872
This commit is contained in:
alwu 2020-10-29 19:06:44 +00:00
parent f0d4e3e5eb
commit d4db5c9d04
38 changed files with 44 additions and 73 deletions

View File

@ -14,12 +14,12 @@ support-files =
file_non_eligible_media.html
file_non_looping_media.html
head.js
../../test/bogus.ogv
../../test/gizmo.mp4
../../test/gizmo-noaudio.webm
../../test/gizmo-short.mp4
../../../test/bogus.ogv
../../../test/gizmo.mp4
../../../test/gizmo-noaudio.webm
../../../test/gizmo-short.mp4
!/toolkit/components/pictureinpicture/tests/head.js
../../../../toolkit/content/tests/browser/silentAudioTrack.webm
../../../../../toolkit/content/tests/browser/silentAudioTrack.webm
[browser_audio_focus_management.js]
[browser_control_page_with_audible_and_inaudible_media.js]

View File

@ -1,10 +1,7 @@
/* eslint-disable no-undef */
"use strict";
const PAGE_AUDIBLE =
"https://example.com/browser/dom/media/mediacontrol/tests/file_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_autoplay.html";
const PAGE_INAUDIBLE =
"https://example.com/browser/dom/media/mediacontrol/tests/file_muted_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_muted_autoplay.html";
const testVideoId = "autoplay";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_audio_and_inaudible_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_audio_and_inaudible_media.html";
add_task(async function setupTestingPref() {
await SpecialPowers.pushPrefEnv({

View File

@ -1,14 +1,13 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const PAGE2_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_main_frame_with_multiple_child_session_frames.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_main_frame_with_multiple_child_session_frames.html";
const IFRAME_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const CORS_IFRAME_URL =
"https://example.org/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://example.org/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const CORS_IFRAME2_URL =
"https://test1.example.org/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://test1.example.org/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const videoId = "video";
/**

View File

@ -1,8 +1,7 @@
/* eslint-disable no-undef */
const mainPageURL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_main_frame_with_multiple_child_session_frames.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_main_frame_with_multiple_child_session_frames.html";
const frameURL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const frame1 = "frame1";
const frame2 = "frame2";

View File

@ -1,16 +1,14 @@
/* eslint-disable no-undef */
// Import this in order to use `triggerPictureInPicture()`.
/* import-globals-from ../../../../toolkit/components/pictureinpicture/tests/head.js */
/* import-globals-from ../../../../../toolkit/components/pictureinpicture/tests/head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/head.js",
this
);
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const IFRAME_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const testVideoId = "video";
add_task(async function setupTestingPref() {

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY_MEDIA =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";
/**

View File

@ -1,15 +1,12 @@
/* eslint-disable no-undef */
"use strict";
// Import this in order to use `triggerPictureInPicture()`.
/* import-globals-from ../../../../toolkit/components/pictureinpicture/tests/head.js */
/* import-globals-from ../../../../../toolkit/components/pictureinpicture/tests/head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/head.js",
this
);
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,8 +1,7 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const PAGE_EMPTY_TITLE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_empty_title.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_empty_title.html";
const testVideoId = "video";
const defaultFaviconName = "defaultFavicon.svg";

View File

@ -1,9 +1,8 @@
/* eslint-disable no-undef */
const PAGE_NON_ELIGIBLE_MEDIA =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_eligible_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_eligible_media.html";
// Import this in order to use `triggerPictureInPicture()`.
/* import-globals-from ../../../../toolkit/components/pictureinpicture/tests/head.js */
/* import-globals-from ../../../../../toolkit/components/pictureinpicture/tests/head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/head.js",
this

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,8 +1,7 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const IFRAME_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_iframe_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_iframe_media.html";
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,14 +1,12 @@
/* eslint-disable no-undef */
// Import this in order to use `triggerPictureInPicture()`.
/* import-globals-from ../../../../toolkit/components/pictureinpicture/tests/head.js */
/* import-globals-from ../../../../../toolkit/components/pictureinpicture/tests/head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/head.js",
this
);
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";
const sDefaultSupportedKeys = ["focus", "play", "pause", "playpause", "stop"];

View File

@ -1,16 +1,14 @@
/* eslint-disable no-undef */
// Import this in order to use `triggerPictureInPicture()`.
/* import-globals-from ../../../../toolkit/components/pictureinpicture/tests/head.js */
/* import-globals-from ../../../../../toolkit/components/pictureinpicture/tests/head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/head.js",
this
);
const PAGE_NOSRC_MEDIA =
"https://example.com/browser/dom/media/mediacontrol/tests/file_no_src_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_no_src_media.html";
const PAGE_ERROR_MEDIA =
"https://example.com/browser/dom/media/mediacontrol/tests/file_error_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_error_media.html";
const PAGES = [PAGE_NOSRC_MEDIA, PAGE_ERROR_MEDIA];
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_multiple_audible_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_multiple_audible_media.html";
add_task(async function setupTestingPref() {
await SpecialPowers.pushPrefEnv({

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY_MEDIA =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const testVideoId = "video";

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_URL =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_looping_media.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_looping_media.html";
add_task(async function setupTestingPref() {
await SpecialPowers.pushPrefEnv({

View File

@ -1,6 +1,5 @@
/* eslint-disable no-undef */
const PAGE_NON_AUTOPLAY =
"https://example.com/browser/dom/media/mediacontrol/tests/file_non_autoplay.html";
"https://example.com/browser/dom/media/mediacontrol/tests/browser/file_non_autoplay.html";
const VIDEO_ID = "video";
add_task(async function setupTestingPref() {

View File

@ -1,5 +1,3 @@
/* eslint-disable no-undef */
/**
* Create a new tab and load the content from a given window (optional), if
* caller doesn't provide any window, then we would create tab in the current

View File

@ -2,7 +2,7 @@
tags = mediacontrol
support-files =
file_media_session.html
../../mediacontrol/tests/head.js
../../mediacontrol/tests/browser/head.js
../../test/gizmo.mp4
[browser_active_mediasession_among_tabs.js]

View File

@ -83,7 +83,7 @@ MOCHITEST_MANIFESTS += [
]
BROWSER_CHROME_MANIFESTS += [
"mediacontrol/tests/browser.ini",
"mediacontrol/tests/browser/browser.inii",
"mediasession/test/browser.ini",
]

View File

@ -334,6 +334,7 @@ module.exports = {
MatchPatternSet: false,
MediaCapabilities: false,
MediaCapabilitiesInfo: false,
MediaControlService: false,
MediaDeviceInfo: false,
MediaDevices: false,
MediaElementAudioSourceNode: false,