diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /browser/base/content/test/general | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/general')
44 files changed, 89 insertions, 93 deletions
diff --git a/browser/base/content/test/general/browser.toml b/browser/base/content/test/general/browser.toml index 6928ba2d4b..31d519d550 100644 --- a/browser/base/content/test/general/browser.toml +++ b/browser/base/content/test/general/browser.toml @@ -37,10 +37,6 @@ support-files = [ "title_test.svg", "unknownContentType_file.pif", "unknownContentType_file.pif^headers^", - "video.ogg", - "web_video.html", - "web_video1.ogv", - "web_video1.ogv^headers^", "!/image/test/mochitest/blue.png", "!/toolkit/content/tests/browser/common/mockTransfer.js", ] @@ -211,6 +207,7 @@ support-files = [ "dummy.ics", "dummy.ics^headers^", "redirect_download.sjs", + "video.webm", ] # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD. @@ -435,9 +432,19 @@ skip-if = [ "os == 'win' && debug", "os =='linux'", #Bug 1212419 ] +support-files = [ + "web_video.html", + "web_video1.webm", + "web_video1.webm^headers^", +] # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD. ["browser_save_video_frame.js"] +support-files = [ + "web_video.html", + "web_video1.webm", + "web_video1.webm^headers^", +] # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD. ["browser_selectTabAtIndex.js"] diff --git a/browser/base/content/test/general/browser_accesskeys.js b/browser/base/content/test/general/browser_accesskeys.js index 0809553404..965da8d9df 100644 --- a/browser/base/content/test/general/browser_accesskeys.js +++ b/browser/base/content/test/general/browser_accesskeys.js @@ -122,7 +122,7 @@ add_task(async function () { function performAccessKey(browser, key) { return new Promise(resolve => { let removeFocus, removeKeyDown, removeKeyUp; - function callback(eventName, result) { + function callback() { removeFocus(); removeKeyUp(); removeKeyDown(); @@ -190,7 +190,7 @@ function performAccessKey(browser, key) { } // This version is used when a chrome element is expected to be found for an accesskey. -async function performAccessKeyForChrome(key, inChild) { +async function performAccessKeyForChrome(key) { let waitFocusChangePromise = BrowserTestUtils.waitForEvent( document, "focus", diff --git a/browser/base/content/test/general/browser_alltabslistener.js b/browser/base/content/test/general/browser_alltabslistener.js index c7829d16fe..fc950d6ce5 100644 --- a/browser/base/content/test/general/browser_alltabslistener.js +++ b/browser/base/content/test/general/browser_alltabslistener.js @@ -7,16 +7,9 @@ function getOriginalURL(request) { } var gFrontProgressListener = { - onProgressChange( - aWebProgress, - aRequest, - aCurSelfProgress, - aMaxSelfProgress, - aCurTotalProgress, - aMaxTotalProgress - ) {}, + onProgressChange() {}, - onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags) { var url = getOriginalURL(aRequest); if (url == "about:blank") { return; @@ -28,7 +21,7 @@ var gFrontProgressListener = { assertCorrectBrowserAndEventOrderForFront(state); }, - onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocationURI) { var url = getOriginalURL(aRequest); if (url == "about:blank") { return; @@ -64,7 +57,7 @@ function assertCorrectBrowserAndEventOrderForFront(aEventName) { } var gAllProgressListener = { - onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags) { var url = getOriginalURL(aRequest); if (url == "about:blank") { // ignore initial about blank diff --git a/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js b/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js index 8eb07a863a..81ed5a1040 100644 --- a/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js +++ b/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js @@ -57,7 +57,7 @@ add_task(async function closeWindowWithMultipleTabsIncludingOneBeforeUnload() { ); let windowClosedPromise = BrowserTestUtils.domWindowClosed(newWin); expectingDialog = true; - newWin.BrowserTryToCloseWindow(); + newWin.BrowserCommands.tryToCloseWindow(); await windowClosedPromise; ok(!expectingDialog, "There should have been a dialog."); ok(newWin.closed, "Window should be closed."); @@ -71,7 +71,7 @@ add_task(async function closeWindoWithSingleTabTwice() { let windowClosedPromise = BrowserTestUtils.domWindowClosed(newWin); expectingDialog = true; wantToClose = false; - let firstDialogShownPromise = new Promise((resolve, reject) => { + let firstDialogShownPromise = new Promise(resolve => { resolveDialogPromise = resolve; }); firstTab.closeButton.click(); diff --git a/browser/base/content/test/general/browser_bug356571.js b/browser/base/content/test/general/browser_bug356571.js index aa3569c93d..69b45e040d 100644 --- a/browser/base/content/test/general/browser_bug356571.js +++ b/browser/base/content/test/general/browser_bug356571.js @@ -45,7 +45,7 @@ const kURIs = ["bad://www.mozilla.org/", kDummyPage, kDummyPage]; var gProgressListener = { _runCount: 0, - onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags) { if ((aStateFlags & kCompleteState) == kCompleteState) { if (++this._runCount != kURIs.length) { return; diff --git a/browser/base/content/test/general/browser_bug417483.js b/browser/base/content/test/general/browser_bug417483.js index 68e2e99511..28da91eea1 100644 --- a/browser/base/content/test/general/browser_bug417483.js +++ b/browser/base/content/test/general/browser_bug417483.js @@ -8,7 +8,7 @@ add_task(async function () { BrowserTestUtils.startLoadingURIString(gBrowser, htmlContent); await loadedPromise; - await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function (arg) { + await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () { let frame = content.frames[0]; let sel = frame.getSelection(); let range = frame.document.createRange(); diff --git a/browser/base/content/test/general/browser_bug537013.js b/browser/base/content/test/general/browser_bug537013.js index 5c871a759c..58bcec9754 100644 --- a/browser/base/content/test/general/browser_bug537013.js +++ b/browser/base/content/test/general/browser_bug537013.js @@ -15,7 +15,7 @@ var HasFindClipboard = Services.clipboard.isClipboardTypeSupported( Services.clipboard.kFindClipboard ); -function addTabWithText(aText, aCallback) { +function addTabWithText(aText) { let newTab = BrowserTestUtils.addTab( gBrowser, "data:text/html;charset=utf-8,<h1 id='h1'>" + aText + "</h1>" diff --git a/browser/base/content/test/general/browser_bug565575.js b/browser/base/content/test/general/browser_bug565575.js index 6176c537e3..b974b17205 100644 --- a/browser/base/content/test/general/browser_bug565575.js +++ b/browser/base/content/test/general/browser_bug565575.js @@ -3,7 +3,7 @@ add_task(async function () { await BrowserTestUtils.openNewForegroundTab( gBrowser, - () => BrowserOpenTab(), + () => BrowserCommands.openTab(), false ); ok(gURLBar.focused, "location bar is focused for a new tab"); diff --git a/browser/base/content/test/general/browser_bug567306.js b/browser/base/content/test/general/browser_bug567306.js index 3d3e47e17d..24280371d8 100644 --- a/browser/base/content/test/general/browser_bug567306.js +++ b/browser/base/content/test/general/browser_bug567306.js @@ -10,7 +10,7 @@ add_task(async function () { let newwindow = await BrowserTestUtils.openNewBrowserWindow(); let selectedBrowser = newwindow.gBrowser.selectedBrowser; - await new Promise((resolve, reject) => { + await new Promise(resolve => { BrowserTestUtils.waitForContentEvent( selectedBrowser, "pageshow", diff --git a/browser/base/content/test/general/browser_bug609700.js b/browser/base/content/test/general/browser_bug609700.js index 8195eba4ec..615b63c3d8 100644 --- a/browser/base/content/test/general/browser_bug609700.js +++ b/browser/base/content/test/general/browser_bug609700.js @@ -1,11 +1,7 @@ function test() { waitForExplicitFinish(); - Services.ww.registerNotification(function notification( - aSubject, - aTopic, - aData - ) { + Services.ww.registerNotification(function notification(aSubject, aTopic) { if (aTopic == "domwindowopened") { Services.ww.unregisterNotification(notification); diff --git a/browser/base/content/test/general/browser_bug623893.js b/browser/base/content/test/general/browser_bug623893.js index 79cd10c591..0f742a8e8e 100644 --- a/browser/base/content/test/general/browser_bug623893.js +++ b/browser/base/content/test/general/browser_bug623893.js @@ -38,7 +38,7 @@ async function promiseGetIndex(browser) { return shistory.index; } -let duplicate = async function (delta, msg, cb) { +let duplicate = async function (delta, msg) { var startIndex = await promiseGetIndex(gBrowser.selectedBrowser); duplicateTabIn(gBrowser.selectedTab, "tab", delta); diff --git a/browser/base/content/test/general/browser_bug676619.js b/browser/base/content/test/general/browser_bug676619.js index 80bbce8cb0..90dd8f4f7c 100644 --- a/browser/base/content/test/general/browser_bug676619.js +++ b/browser/base/content/test/general/browser_bug676619.js @@ -22,7 +22,7 @@ function waitForNewWindow() { var domwindow = aXULWindow.docShell.domWindow; domwindow.addEventListener("load", downloadOnLoad, true); }, - onCloseWindow: aXULWindow => {}, + onCloseWindow: () => {}, }; Services.wm.addListener(listener); @@ -97,7 +97,7 @@ async function testLink(link, name) { } // Cross-origin URL does not trigger a download -async function testLocation(link, url) { +async function testLocation(link) { let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser); SpecialPowers.spawn(gBrowser.selectedBrowser, [link], contentLink => { @@ -116,8 +116,8 @@ async function runTest(url) { await BrowserTestUtils.browserLoaded(browser); await testLink("link1", "test.txt"); - await testLink("link2", "video.ogg"); - await testLink("link3", "just some video.ogg"); + await testLink("link2", "video.webm"); + await testLink("link3", "just some video.webm"); await testLink("link4", "with-target.txt"); await testLink("link5", "javascript.html"); await testLink("link6", "test.blob"); @@ -132,8 +132,8 @@ async function runTest(url) { // Check that we enforce the correct extension if the website's // is bogus or missing. These extensions can differ slightly (ogx vs ogg, // htm vs html) on different OSes. - let oggExtension = getMIMEInfoForType("application/ogg").primaryExtension; - await testLink("link13", "no file extension." + oggExtension); + let webmExtension = getMIMEInfoForType("video/webm").primaryExtension; + await testLink("link13", "no file extension." + webmExtension); // See https://bugzilla.mozilla.org/show_bug.cgi?id=1690051#c8 if (AppConstants.platform != "win") { diff --git a/browser/base/content/test/general/browser_bug734076.js b/browser/base/content/test/general/browser_bug734076.js index bd86f8e2b3..e9bec6834e 100644 --- a/browser/base/content/test/general/browser_bug734076.js +++ b/browser/base/content/test/general/browser_bug734076.js @@ -36,7 +36,7 @@ add_task(async function () { ); }, verify(browser) { - return SpecialPowers.spawn(browser, [], async function (arg) { + return SpecialPowers.spawn(browser, [], async function () { Assert.equal( content.document.body.textContent, "", @@ -67,7 +67,7 @@ add_task(async function () { ); }, verify(browser) { - return SpecialPowers.spawn(browser, [], async function (arg) { + return SpecialPowers.spawn(browser, [], async function () { Assert.equal( content.document.body.textContent, "", @@ -105,7 +105,7 @@ add_task(async function () { ); }, verify(browser) { - return SpecialPowers.spawn(browser, [], async function (arg) { + return SpecialPowers.spawn(browser, [], async function () { Assert.equal( content.document.body.textContent, "", diff --git a/browser/base/content/test/general/browser_bug763468_perwindowpb.js b/browser/base/content/test/general/browser_bug763468_perwindowpb.js index bed03561ca..05a7f90550 100644 --- a/browser/base/content/test/general/browser_bug763468_perwindowpb.js +++ b/browser/base/content/test/general/browser_bug763468_perwindowpb.js @@ -44,7 +44,7 @@ add_task(async function testPBNewTab() { async function openNewTab(aWindow, aExpectedURL) { // Open a new tab - aWindow.BrowserOpenTab(); + aWindow.BrowserCommands.openTab(); let browser = aWindow.gBrowser.selectedBrowser; // We're already loaded. diff --git a/browser/base/content/test/general/browser_bug767836_perwindowpb.js b/browser/base/content/test/general/browser_bug767836_perwindowpb.js index 7fcc6ad565..e237f1216d 100644 --- a/browser/base/content/test/general/browser_bug767836_perwindowpb.js +++ b/browser/base/content/test/general/browser_bug767836_perwindowpb.js @@ -59,7 +59,7 @@ add_task(async function test_newTabService() { async function openNewTab(aWindow, aExpectedURL) { // Open a new tab - aWindow.BrowserOpenTab(); + aWindow.BrowserCommands.openTab(); let browser = aWindow.gBrowser.selectedBrowser; // We're already loaded. diff --git a/browser/base/content/test/general/browser_bug817947.js b/browser/base/content/test/general/browser_bug817947.js index ea3c39222e..f83e07a9af 100644 --- a/browser/base/content/test/general/browser_bug817947.js +++ b/browser/base/content/test/general/browser_bug817947.js @@ -32,7 +32,7 @@ add_task(async () => { win.close(); }); -async function preparePendingTab(aCallback) { +async function preparePendingTab() { let tab = BrowserTestUtils.addTab(gBrowser, URL); await BrowserTestUtils.browserLoaded(tab.linkedBrowser); diff --git a/browser/base/content/test/general/browser_clipboard.js b/browser/base/content/test/general/browser_clipboard.js index a4c823969f..7820c4ec89 100644 --- a/browser/base/content/test/general/browser_clipboard.js +++ b/browser/base/content/test/general/browser_clipboard.js @@ -68,7 +68,7 @@ add_task(async function () { let selection = content.document.getSelection(); selection.modify("move", "right", "line"); - return new Promise((resolve, reject) => { + return new Promise(resolve => { content.addEventListener( "paste", event => { @@ -130,7 +130,7 @@ add_task(async function () { selection.modify("extend", "left", "word"); selection.modify("extend", "left", "character"); - return new Promise((resolve, reject) => { + return new Promise(resolve => { content.addEventListener( "cut", event => { @@ -157,7 +157,7 @@ add_task(async function () { let selection = content.document.getSelection(); selection.modify("move", "left", "line"); - return new Promise((resolve, reject) => { + return new Promise(resolve => { content.addEventListener( "paste", event => { diff --git a/browser/base/content/test/general/browser_clipboard_pastefile.js b/browser/base/content/test/general/browser_clipboard_pastefile.js index f034883ef2..6ef3edf30e 100644 --- a/browser/base/content/test/general/browser_clipboard_pastefile.js +++ b/browser/base/content/test/general/browser_clipboard_pastefile.js @@ -50,7 +50,7 @@ add_task(async function () { ); let browser = tab.linkedBrowser; - let resultPromise = SpecialPowers.spawn(browser, [], function (arg) { + let resultPromise = SpecialPowers.spawn(browser, [], function () { return new Promise(resolve => { content.document.addEventListener("testresult", event => { resolve(event.detail.result); @@ -73,7 +73,7 @@ add_task(async function () { document.documentElement.appendChild(input); input.focus(); - await new Promise((resolve, reject) => { + await new Promise(resolve => { input.addEventListener( "paste", function (event) { diff --git a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js index c96fa6cf7b..f44620c29e 100644 --- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js +++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js @@ -149,7 +149,7 @@ add_task(async function () { gBrowser.selectedBrowser, FS_CHANGE_SIZE ); - executeSoon(() => BrowserFullScreen()); + executeSoon(() => BrowserCommands.fullScreen()); await fullscreenPromise; } }); @@ -195,7 +195,7 @@ add_task(async function () { // dispatched synchronously, which would cause the event listener // miss that event and wait infinitely. fullscreenPromise = waitForFullscreenChanges(browser, FS_CHANGE_SIZE); - executeSoon(() => BrowserFullScreen()); + executeSoon(() => BrowserCommands.fullScreen()); contentStates = await fullscreenPromise; checkState({ inDOMFullscreen: false, inFullscreen: true }, contentStates); @@ -228,7 +228,7 @@ add_task(async function () { if (window.fullScreen) { info("> Cleanup"); fullscreenPromise = waitForFullscreenChanges(browser, FS_CHANGE_SIZE); - executeSoon(() => BrowserFullScreen()); + executeSoon(() => BrowserCommands.fullScreen()); await fullscreenPromise; } } diff --git a/browser/base/content/test/general/browser_double_close_tab.js b/browser/base/content/test/general/browser_double_close_tab.js index f5f2f1b6c7..6beea0f42b 100644 --- a/browser/base/content/test/general/browser_double_close_tab.js +++ b/browser/base/content/test/general/browser_double_close_tab.js @@ -18,7 +18,7 @@ function waitForDialog(callback) { function waitForDialogDestroyed(node, callback) { // Now listen for the dialog going away again... - let observer = new MutationObserver(function (muts) { + let observer = new MutationObserver(function () { if (!node.parentNode) { ok(true, "Dialog is gone"); done(); diff --git a/browser/base/content/test/general/browser_focusonkeydown.js b/browser/base/content/test/general/browser_focusonkeydown.js index 9cf1f113f5..53919bc1b3 100644 --- a/browser/base/content/test/general/browser_focusonkeydown.js +++ b/browser/base/content/test/general/browser_focusonkeydown.js @@ -20,7 +20,7 @@ add_task(async function () { gURLBar.addEventListener( "keydown", - function (event) { + function () { gBrowser.selectedBrowser.focus(); }, { capture: true, once: true } diff --git a/browser/base/content/test/general/browser_fullscreen-window-open.js b/browser/base/content/test/general/browser_fullscreen-window-open.js index 2b21e34e92..be1d2ca3a3 100644 --- a/browser/base/content/test/general/browser_fullscreen-window-open.js +++ b/browser/base/content/test/general/browser_fullscreen-window-open.js @@ -26,14 +26,14 @@ async function test() { await promiseTabLoadEvent(newBrowser.selectedTab, gHttpTestRoot + TEST_FILE); // Enter browser fullscreen mode. - newWin.BrowserFullScreen(); + newWin.BrowserCommands.fullScreen(); runNextTest(); } registerCleanupFunction(async function () { // Exit browser fullscreen mode. - newWin.BrowserFullScreen(); + newWin.BrowserCommands.fullScreen(); await BrowserTestUtils.closeWindow(newWin); @@ -336,7 +336,7 @@ WindowListener.prototype = { Services.wm.removeListener(this); let domwindow = aXULWindow.docShell.domWindow; - let onLoad = aEvent => { + let onLoad = () => { is( domwindow.document.location.href, this.test_url, @@ -361,6 +361,6 @@ WindowListener.prototype = { }; domwindow.addEventListener("load", onLoad, true); }, - onCloseWindow(aXULWindow) {}, + onCloseWindow() {}, QueryInterface: ChromeUtils.generateQI(["nsIWindowMediatorListener"]), }; diff --git a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js b/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js index 1624a1514d..fae1130685 100644 --- a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js +++ b/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js @@ -33,7 +33,7 @@ add_task(async function checkBackFromInvalidURI() { false, // Be paranoid we *are* actually seeing this other page load, not some kind of race // for if/when we do start firing pageshow for the error page... - function (e) { + function () { return gBrowser.currentURI.spec == "about:robots"; } ); diff --git a/browser/base/content/test/general/browser_newWindowDrop.js b/browser/base/content/test/general/browser_newWindowDrop.js index 3e41b0d6ac..445999befd 100644 --- a/browser/base/content/test/general/browser_newWindowDrop.js +++ b/browser/base/content/test/general/browser_newWindowDrop.js @@ -184,7 +184,7 @@ function dropText(text, expectedURLs, ignoreFirstWindow = false) { ); } -async function drop(dragData, expectedURLs, ignoreFirstWindow = false) { +async function drop(dragData, expectedURLs) { let dragDataString = JSON.stringify(dragData); info( `Starting test for dragData:${dragDataString}; expectedURLs.length:${expectedURLs.length}` diff --git a/browser/base/content/test/general/browser_plainTextLinks.js b/browser/base/content/test/general/browser_plainTextLinks.js index 706f21387c..44c9b8422b 100644 --- a/browser/base/content/test/general/browser_plainTextLinks.js +++ b/browser/base/content/test/general/browser_plainTextLinks.js @@ -19,7 +19,7 @@ add_task(async function () { await SimpleTest.promiseFocus(gBrowser.selectedBrowser); // Initial setup of the content area. - await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function (arg) { + await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () { let doc = content.document; let range = doc.createRange(); let selection = content.getSelection(); diff --git a/browser/base/content/test/general/browser_private_no_prompt.js b/browser/base/content/test/general/browser_private_no_prompt.js index d8c9f8e7b5..80ba0ca746 100644 --- a/browser/base/content/test/general/browser_private_no_prompt.js +++ b/browser/base/content/test/general/browser_private_no_prompt.js @@ -3,8 +3,8 @@ function test() { var privateWin = OpenBrowserWindow({ private: true }); whenDelayedStartupFinished(privateWin, function () { - privateWin.BrowserOpenTab(); - privateWin.BrowserTryToCloseWindow(); + privateWin.BrowserCommands.openTab(); + privateWin.BrowserCommands.tryToCloseWindow(); ok(true, "didn't prompt"); executeSoon(finish); diff --git a/browser/base/content/test/general/browser_remoteTroubleshoot.js b/browser/base/content/test/general/browser_remoteTroubleshoot.js index 84722b2603..55627f0b28 100644 --- a/browser/base/content/test/general/browser_remoteTroubleshoot.js +++ b/browser/base/content/test/general/browser_remoteTroubleshoot.js @@ -19,9 +19,9 @@ const TEST_URI_GOOD_OBJECT = Services.io.newURI( // Creates a one-shot web-channel for the test data to be sent back from the test page. function promiseChannelResponse(channelID, originOrPermission) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let channel = new WebChannel(channelID, originOrPermission); - channel.listen((id, data, target) => { + channel.listen((id, data) => { channel.stopListening(); resolve(data); }); diff --git a/browser/base/content/test/general/browser_save_link-perwindowpb.js b/browser/base/content/test/general/browser_save_link-perwindowpb.js index d5a0eef86c..29fd54d2d9 100644 --- a/browser/base/content/test/general/browser_save_link-perwindowpb.js +++ b/browser/base/content/test/general/browser_save_link-perwindowpb.js @@ -68,7 +68,7 @@ function triggerSave(aWindow, aCallback) { info("popup hidden"); } - function onTransferComplete(aWindow2, downloadSuccess, destDir) { + function onTransferComplete(aWindow2, downloadSuccess) { ok(downloadSuccess, "Link should have been downloaded successfully"); aWindow2.close(); @@ -118,7 +118,7 @@ function test() { info("Finished running the cleanup code"); }); - function observer(subject, topic, state) { + function observer(subject, topic) { info("observer called with " + topic); if (topic == "http-on-modify-request") { onModifyRequest(subject); diff --git a/browser/base/content/test/general/browser_save_link_when_window_navigates.js b/browser/base/content/test/general/browser_save_link_when_window_navigates.js index 1c68b91ddf..e5c7fa76b2 100644 --- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js +++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js @@ -70,7 +70,7 @@ function triggerSave(aWindow, aCallback) { info("done mockTransferCallback"); }; - function onUCTDialog(dialog) { + function onUCTDialog() { SpecialPowers.spawn(testBrowser, [], async () => { content.document.querySelector("iframe").remove(); }).then(() => executeSoon(continueDownloading)); @@ -104,7 +104,7 @@ var windowObserver = { } this._callback = aCallback; }, - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { if (aTopic != "domwindowopened") { return; } @@ -113,7 +113,7 @@ var windowObserver = { win.addEventListener( "load", - function (event) { + function () { if (win.location == UCT_URI) { SimpleTest.executeSoon(function () { if (windowObserver._callback) { diff --git a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js index 42632bdc5a..1312c7b954 100644 --- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js +++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js @@ -12,9 +12,9 @@ function createTemporarySaveDirectory() { } function promiseNoCacheEntry(filename) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { Visitor.prototype = { - onCacheStorageInfo(num, consumption) { + onCacheStorageInfo(num) { info("disk storage contains " + num + " entries"); }, onCacheEntryInfo(uri) { @@ -40,7 +40,7 @@ function promiseNoCacheEntry(filename) { } function promiseImageDownloaded() { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let fileName; let MockFilePicker = SpecialPowers.MockFilePicker; MockFilePicker.init(window.browsingContext); diff --git a/browser/base/content/test/general/browser_save_video.js b/browser/base/content/test/general/browser_save_video.js index d8dc5c6e2e..f0450ac1fa 100644 --- a/browser/base/content/test/general/browser_save_video.js +++ b/browser/base/content/test/general/browser_save_video.js @@ -52,7 +52,7 @@ add_task(async function () { is( fileName, - "web-video1-expectedName.ogv", + "web-video1-expectedName.webm", "Video file name is correctly retrieved from Content-Disposition http header" ); resolve(); diff --git a/browser/base/content/test/general/browser_tabfocus.js b/browser/base/content/test/general/browser_tabfocus.js index b057a504e5..7cc9158084 100644 --- a/browser/base/content/test/general/browser_tabfocus.js +++ b/browser/base/content/test/general/browser_tabfocus.js @@ -322,7 +322,7 @@ add_task(async function () { "tab change when selected tab element was focused" ); - let switchWaiter = new Promise((resolve, reject) => { + let switchWaiter = new Promise(resolve => { gBrowser.addEventListener( "TabSwitchDone", function () { @@ -516,7 +516,7 @@ add_task(async function () { // now go back again gURLBar.focus(); - await new Promise((resolve, reject) => { + await new Promise(resolve => { BrowserTestUtils.waitForContentEvent( window.gBrowser.selectedBrowser, "pageshow", diff --git a/browser/base/content/test/general/browser_tabs_owner.js b/browser/base/content/test/general/browser_tabs_owner.js index 4a32da12f1..e214b861e8 100644 --- a/browser/base/content/test/general/browser_tabs_owner.js +++ b/browser/base/content/test/general/browser_tabs_owner.js @@ -8,13 +8,13 @@ function test() { is(gBrowser.tabs.length, 4, "4 tabs are open"); owner = gBrowser.selectedTab = gBrowser.tabs[2]; - BrowserOpenTab(); + BrowserCommands.openTab(); is(gBrowser.selectedTab, gBrowser.tabs[4], "newly opened tab is selected"); gBrowser.removeCurrentTab(); is(gBrowser.selectedTab, owner, "owner is selected"); owner = gBrowser.selectedTab; - BrowserOpenTab(); + BrowserCommands.openTab(); gBrowser.selectedTab = gBrowser.tabs[1]; gBrowser.selectedTab = gBrowser.tabs[4]; gBrowser.removeCurrentTab(); @@ -25,7 +25,7 @@ function test() { ); owner = gBrowser.selectedTab; - BrowserOpenTab(); + BrowserCommands.openTab(); gBrowser.moveTabTo(gBrowser.selectedTab, 0); gBrowser.removeCurrentTab(); is( diff --git a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js index 6c62670e6f..26c040324a 100644 --- a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js +++ b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js @@ -1,7 +1,7 @@ function wait_while_tab_is_busy() { return new Promise(resolve => { let progressListener = { - onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags) { if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) { gBrowser.removeProgressListener(this); setTimeout(resolve, 0); @@ -27,7 +27,7 @@ var with_new_tab_opened = async function (options, taskFn) { }; add_task(async function test_regular_page() { - function test_expect_view_source_enabled(browser) { + function test_expect_view_source_enabled() { for (let element of [...XULBrowserWindow._elementsForViewSource]) { ok(!element.hasAttribute("disabled"), "View Source should be enabled"); } @@ -44,7 +44,7 @@ add_task(async function test_regular_page() { }); add_task(async function test_view_source_page() { - function test_expect_view_source_disabled(browser) { + function test_expect_view_source_disabled() { for (let element of [...XULBrowserWindow._elementsForViewSource]) { ok(element.hasAttribute("disabled"), "View Source should be disabled"); } diff --git a/browser/base/content/test/general/browser_zbug569342.js b/browser/base/content/test/general/browser_zbug569342.js index 4aa6bfbb9c..0c30ff3d1d 100644 --- a/browser/base/content/test/general/browser_zbug569342.js +++ b/browser/base/content/test/general/browser_zbug569342.js @@ -57,7 +57,7 @@ function testFindDisabled(url) { } async function testFindEnabled(url) { - return BrowserTestUtils.withNewTab(url, async function (browser) { + return BrowserTestUtils.withNewTab(url, async function () { ok( !document.getElementById("cmd_find").getAttribute("disabled"), "Find command should not be disabled" diff --git a/browser/base/content/test/general/download_page.html b/browser/base/content/test/general/download_page.html index 300bacdb72..625ff46aab 100644 --- a/browser/base/content/test/general/download_page.html +++ b/browser/base/content/test/general/download_page.html @@ -13,10 +13,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619 <ul> <li><a href="download_page_1.txt" download="test.txt" id="link1">Download "test.txt"</a></li> - <li><a href="video.ogg" - download id="link2">Download "video.ogg"</a></li> - <li><a href="video.ogg" - download="just some video.ogg" id="link3">Download "just some video.ogg"</a></li> + <li><a href="video.webm" + download id="link2">Download "video.webm"</a></li> + <li><a href="video.webm" + download="just some video.webm" id="link3">Download "just some video.webm"</a></li> <li><a href="download_page_2.txt" download="with-target.txt" id="link4">Download "with-target.txt"</a></li> <li><a href="javascript:(1+2)+''" @@ -33,7 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619 download="download_page_4.txt" id="link11">Download "download_page_4.txt"</a></li> <li><a href="http://example.com/" download="example.com" id="link12" target="_blank">Download "example.com"</a></li> - <li><a href="video.ogg" + <li><a href="video.webm" download="no file extension" id="link13">Download "force extension"</a></li> <li><a href="dummy.ics" download="dummy.not-ics" id="link14">Download "dummy.not-ics"</a></li> @@ -64,7 +64,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619 "wrong-file-name", {type: "application/x-some-file"})); document.getElementById("link7").href = fileURL; - window.addEventListener("beforeunload", function(evt) { + window.addEventListener("beforeunload", function() { document.getElementById("unload-flag").textContent = "Fail"; }); </script> diff --git a/browser/base/content/test/general/head.js b/browser/base/content/test/general/head.js index f7b4a0d93b..94f60f2936 100644 --- a/browser/base/content/test/general/head.js +++ b/browser/base/content/test/general/head.js @@ -165,7 +165,7 @@ function promiseOpenAndLoadWindow(aOptions, aWaitForDelayedStartup = false) { return new Promise(resolve => { let win = OpenBrowserWindow(aOptions); if (aWaitForDelayedStartup) { - Services.obs.addObserver(function onDS(aSubject, aTopic, aData) { + Services.obs.addObserver(function onDS(aSubject) { if (aSubject != win) { return; } @@ -185,7 +185,7 @@ function promiseOpenAndLoadWindow(aOptions, aWaitForDelayedStartup = false) { } async function whenNewTabLoaded(aWindow, aCallback) { - aWindow.BrowserOpenTab(); + aWindow.BrowserCommands.openTab(); let expectedURL = AboutNewTab.newTabURL; let browser = aWindow.gBrowser.selectedBrowser; diff --git a/browser/base/content/test/general/video.ogg b/browser/base/content/test/general/video.ogg Binary files differdeleted file mode 100644 index ac7ece3519..0000000000 --- a/browser/base/content/test/general/video.ogg +++ /dev/null diff --git a/browser/base/content/test/general/video.webm b/browser/base/content/test/general/video.webm Binary files differnew file mode 100644 index 0000000000..0ca38d3cf0 --- /dev/null +++ b/browser/base/content/test/general/video.webm diff --git a/browser/base/content/test/general/web_video.html b/browser/base/content/test/general/web_video.html index 467fb0ce1c..e03c85d1dc 100644 --- a/browser/base/content/test/general/web_video.html +++ b/browser/base/content/test/general/web_video.html @@ -5,6 +5,6 @@ <body> This document has some web video in it. <br> - <video src="web_video1.ogv" id="video1"> </video> + <video src="web_video1.webm" id="video1"> </video> </body> </html> diff --git a/browser/base/content/test/general/web_video1.ogv b/browser/base/content/test/general/web_video1.ogv Binary files differdeleted file mode 100644 index 093158432a..0000000000 --- a/browser/base/content/test/general/web_video1.ogv +++ /dev/null diff --git a/browser/base/content/test/general/web_video1.ogv^headers^ b/browser/base/content/test/general/web_video1.ogv^headers^ deleted file mode 100644 index 4511e92552..0000000000 --- a/browser/base/content/test/general/web_video1.ogv^headers^ +++ /dev/null @@ -1,3 +0,0 @@ -Content-Disposition: filename="web-video1-expectedName.ogv" -Content-Type: video/ogg - diff --git a/browser/base/content/test/general/web_video1.webm b/browser/base/content/test/general/web_video1.webm Binary files differnew file mode 100644 index 0000000000..2c9d7dad8d --- /dev/null +++ b/browser/base/content/test/general/web_video1.webm diff --git a/browser/base/content/test/general/web_video1.webm^headers^ b/browser/base/content/test/general/web_video1.webm^headers^ new file mode 100644 index 0000000000..d027132ea2 --- /dev/null +++ b/browser/base/content/test/general/web_video1.webm^headers^ @@ -0,0 +1,3 @@ +Content-Disposition: filename="web-video1-expectedName.webm" +Content-Type: video/webm + |