summaryrefslogtreecommitdiffstats
path: root/toolkit/components/viewsource
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /toolkit/components/viewsource
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/viewsource')
-rw-r--r--toolkit/components/viewsource/content/viewSourceUtils.js4
-rw-r--r--toolkit/components/viewsource/test/browser/browser_contextmenu.js2
-rw-r--r--toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js6
-rw-r--r--toolkit/components/viewsource/test/browser/head.js2
4 files changed, 7 insertions, 7 deletions
diff --git a/toolkit/components/viewsource/content/viewSourceUtils.js b/toolkit/components/viewsource/content/viewSourceUtils.js
index 69d3eff287..bc85bb3c1b 100644
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -62,8 +62,8 @@ var gViewSourceUtils = {
}
// Try existing browsers first.
let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
- if (browserWin && browserWin.BrowserViewSourceOfDocument) {
- browserWin.BrowserViewSourceOfDocument(aArgs);
+ if (browserWin && browserWin.BrowserCommands.viewSourceOfDocument) {
+ browserWin.BrowserCommands.viewSourceOfDocument(aArgs);
return;
}
// No browser window created yet, try to create one.
diff --git a/toolkit/components/viewsource/test/browser/browser_contextmenu.js b/toolkit/components/viewsource/test/browser/browser_contextmenu.js
index afc8ab8c84..12244f7589 100644
--- a/toolkit/components/viewsource/test/browser/browser_contextmenu.js
+++ b/toolkit/components/viewsource/test/browser/browser_contextmenu.js
@@ -42,7 +42,7 @@ async function onViewSourceWindowOpen(aWindow) {
gCopyEmailMenuItem = aWindow.document.getElementById("context-copyemail");
let browser = gBrowser.selectedBrowser;
- await SpecialPowers.spawn(browser, [], async function (arg) {
+ await SpecialPowers.spawn(browser, [], async function () {
let tags = content.document.querySelectorAll("a[href]");
Assert.equal(
tags[0].href,
diff --git a/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js b/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js
index 8a38d94719..e141e94150 100644
--- a/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js
+++ b/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js
@@ -33,7 +33,7 @@ add_task(async function () {
},
async browser => {
let winPromise = waitForNewViewSourceWindow("view-source:" + PAGE);
- BrowserViewSource(browser);
+ BrowserCommands.viewSource(browser);
let win = await winPromise;
ok(win, "View Source opened up in a new window.");
@@ -58,14 +58,14 @@ add_task(async function () {
url: "data:text/html," + source,
gBrowser,
},
- async browser => {
+ async () => {
let winPromise = waitForNewViewSourceWindow(
"view-source:data:text/html;charset=utf-8,%3Cp%3E%EF%B7%90test%EF%B7%AF%3C%2Fp%3E"
);
await SpecialPowers.spawn(
gBrowser.selectedBrowser,
[],
- async function (arg) {
+ async function () {
let element = content.document.querySelector("p");
content.getSelection().selectAllChildren(element);
}
diff --git a/toolkit/components/viewsource/test/browser/head.js b/toolkit/components/viewsource/test/browser/head.js
index a75c6a8658..083c169c0a 100644
--- a/toolkit/components/viewsource/test/browser/head.js
+++ b/toolkit/components/viewsource/test/browser/head.js
@@ -43,7 +43,7 @@ async function waitForViewSourceTab(open) {
*/
function openViewSourceForBrowser(browser) {
return waitForViewSourceTab(() => {
- window.BrowserViewSource(browser);
+ window.BrowserCommands.viewSource(browser);
});
}