From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../test/fullscreen/MozDomFullscreen_chrome.xhtml | 2 +- .../browser_fullscreen-navigation-history-race.js | 2 +- .../browser_fullscreen-tab-close-race.js | 2 +- dom/base/test/fullscreen/file_fullscreen-api.html | 22 +++++++++++----------- .../fullscreen/file_fullscreen-bug-1798219-2.html | 2 +- .../fullscreen/file_fullscreen-bug-1798219.html | 2 +- .../test/fullscreen/file_fullscreen-denied.html | 2 +- .../fullscreen/file_fullscreen-esc-exit-inner.html | 2 +- .../test/fullscreen/file_fullscreen-esc-exit.html | 4 ++-- .../test/fullscreen/file_fullscreen-shadowdom.html | 2 +- .../fullscreen/file_fullscreen-svg-element.html | 2 +- dom/base/test/fullscreen/fullscreen.xhtml | 2 +- dom/base/test/fullscreen/fullscreen_helpers.js | 4 ++-- dom/base/test/fullscreen/test_fullscreen-api.html | 2 +- .../test/fullscreen/test_fullscreen_modal.html | 11 ++++++++++- 15 files changed, 36 insertions(+), 27 deletions(-) (limited to 'dom/base/test/fullscreen') diff --git a/dom/base/test/fullscreen/MozDomFullscreen_chrome.xhtml b/dom/base/test/fullscreen/MozDomFullscreen_chrome.xhtml index 93f00311e7..bc92abf3e0 100644 --- a/dom/base/test/fullscreen/MozDomFullscreen_chrome.xhtml +++ b/dom/base/test/fullscreen/MozDomFullscreen_chrome.xhtml @@ -79,7 +79,7 @@ function thirdEntry(event) { gOuterDoc.exitFullscreen(); } -function earlyExit(event) { +function earlyExit() { ok(false, "MozDOMFullscreen:Exited should only be triggered after cancel all fullscreen"); } diff --git a/dom/base/test/fullscreen/browser_fullscreen-navigation-history-race.js b/dom/base/test/fullscreen/browser_fullscreen-navigation-history-race.js index 2ea2b9ee40..49a48c3177 100644 --- a/dom/base/test/fullscreen/browser_fullscreen-navigation-history-race.js +++ b/dom/base/test/fullscreen/browser_fullscreen-navigation-history-race.js @@ -82,7 +82,7 @@ function preventBFCache(aBrowsingContext, aPrevent) { let target = content.document.getElementById("div"); target.addEventListener( "mousedown", - function (e) { + function () { content.window.history.back(); }, { once: true } diff --git a/dom/base/test/fullscreen/browser_fullscreen-tab-close-race.js b/dom/base/test/fullscreen/browser_fullscreen-tab-close-race.js index 10d10a0b0f..1338c4a550 100644 --- a/dom/base/test/fullscreen/browser_fullscreen-tab-close-race.js +++ b/dom/base/test/fullscreen/browser_fullscreen-tab-close-race.js @@ -70,7 +70,7 @@ async function WaitRemoveDocumentAndCloseTab(aBrowser, aBrowsingContext) { return new Promise(resolve => { content.document.addEventListener( "fullscreenchange", - e => { + () => { resolve(); }, { once: true } diff --git a/dom/base/test/fullscreen/file_fullscreen-api.html b/dom/base/test/fullscreen/file_fullscreen-api.html index 645e6ece46..9661b10de9 100644 --- a/dom/base/test/fullscreen/file_fullscreen-api.html +++ b/dom/base/test/fullscreen/file_fullscreen-api.html @@ -112,7 +112,7 @@ function enter2(event) { promise = document.exitFullscreen(); } -function exit2(event) { +function exit2() { is(document.fullscreenElement, null, "Full-screen element should have rolled back."); is(iframe.contentDocument.fullscreenElement, null, @@ -156,7 +156,7 @@ function exit3(event) { promise = outOfDocElement.requestFullscreen(); } -function error1(event) { +function error1() { ok(!document.fullscreenElement, "Requests for full-screen from not-in-doc elements should fail."); assertPromiseRejected(promise, "in error1"); @@ -181,7 +181,7 @@ function enter4(event) { "Should not have a full-screen element again."); } -async function exit_to_arg_test_1(event) { +async function exit_to_arg_test_1() { ok(!document.fullscreenElement, "Should have left full-screen mode (third time)."); addFullscreenChangeContinuation("enter", enter_from_arg_test_1); @@ -196,14 +196,14 @@ async function exit_to_arg_test_1(event) { ok(!threw, "requestFullscreen with bogus arg (123) shouldn't throw exception"); } -function enter_from_arg_test_1(event) { +function enter_from_arg_test_1() { ok(document.fullscreenElement, "Should have entered full-screen after calling with bogus (ignored) argument (fourth time)"); addFullscreenChangeContinuation("exit", exit_to_arg_test_2); document.exitFullscreen(); } -async function exit_to_arg_test_2(event) { +async function exit_to_arg_test_2() { ok(!document.fullscreenElement, "Should have left full-screen mode (fourth time)."); addFullscreenChangeContinuation("enter", enter_from_arg_test_2); @@ -218,14 +218,14 @@ async function exit_to_arg_test_2(event) { ok(!threw, "requestFullscreen with { vrDisplay: null } shouldn't throw exception"); } -function enter_from_arg_test_2(event) { +function enter_from_arg_test_2() { ok(document.fullscreenElement, "Should have entered full-screen after calling with vrDisplay null argument (fifth time)"); addFullscreenChangeContinuation("exit", exit4); document.exitFullscreen(); } -function exit4(event) { +function exit4() { ok(!document.fullscreenElement, "Should be back in non-full-screen mode (fifth time)"); SpecialPowers.pushPrefEnv({"set":[["full-screen-api.allow-trusted-requests-only", true]]}, function() { @@ -234,7 +234,7 @@ function exit4(event) { }); } -function error2(event) { +function error2() { ok(!document.fullscreenElement, "Should still be in normal mode, because calling context isn't trusted."); button = document.createElement("button"); @@ -246,13 +246,13 @@ function error2(event) { sendMouseClick(button); } -function enter5(event) { +function enter5() { ok(document.fullscreenElement, "Moved to full-screen after mouse click"); addFullscreenChangeContinuation("exit", exit5); document.exitFullscreen(); } -function exit5(event) { +function exit5() { ok(!document.fullscreenElement, "Should have left full-screen mode (last time)."); SpecialPowers.pushPrefEnv({ @@ -264,7 +264,7 @@ function exit5(event) { }); } -function error3(event) { +function error3() { ok(!document.fullscreenElement, "Should still be in normal mode, because pref is not enabled."); diff --git a/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html b/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html index 61db80c228..48f2dea09d 100644 --- a/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html +++ b/dom/base/test/fullscreen/file_fullscreen-bug-1798219-2.html @@ -2,7 +2,7 @@