summaryrefslogtreecommitdiffstats
path: root/browser/components/syncedtabs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /browser/components/syncedtabs
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/syncedtabs')
-rw-r--r--browser/components/syncedtabs/TabListView.sys.mjs5
-rw-r--r--browser/components/syncedtabs/sidebar.xhtml1
-rw-r--r--browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js25
3 files changed, 16 insertions, 15 deletions
diff --git a/browser/components/syncedtabs/TabListView.sys.mjs b/browser/components/syncedtabs/TabListView.sys.mjs
index 70c98c4175..aa7ee439c3 100644
--- a/browser/components/syncedtabs/TabListView.sys.mjs
+++ b/browser/components/syncedtabs/TabListView.sys.mjs
@@ -5,6 +5,7 @@
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
+ BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
});
@@ -290,7 +291,7 @@ TabListView.prototype = {
// Middle click on a client
if (itemNode.classList.contains("client")) {
- let where = getChromeWindow(this._window).whereToOpenLink(event);
+ let where = lazy.BrowserUtils.whereToOpenLink(event);
if (where != "current") {
this._openAllClientTabs(itemNode, where);
}
@@ -346,7 +347,7 @@ TabListView.prototype = {
},
onOpenSelected(url, event) {
- let where = getChromeWindow(this._window).whereToOpenLink(event);
+ let where = lazy.BrowserUtils.whereToOpenLink(event);
this.props.onOpenTab(url, where, {});
},
diff --git a/browser/components/syncedtabs/sidebar.xhtml b/browser/components/syncedtabs/sidebar.xhtml
index 7790620f94..b5701450bd 100644
--- a/browser/components/syncedtabs/sidebar.xhtml
+++ b/browser/components/syncedtabs/sidebar.xhtml
@@ -22,7 +22,6 @@
href="chrome://browser/skin/syncedtabs/sidebar.css"
/>
<link rel="localization" href="browser/syncedTabs.ftl" />
- <link rel="localization" href="toolkit/branding/accounts.ftl" />
<title data-l10n-id="synced-tabs-sidebar-title" />
</head>
diff --git a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
index daf980e5fa..2728ba5155 100644
--- a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
+++ b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
@@ -91,28 +91,28 @@ function setupSyncedTabsStubs({
async function testClean() {
sinon.restore();
await new Promise(resolve => {
- window.SidebarUI.browser.contentWindow.addEventListener(
+ window.SidebarController.browser.contentWindow.addEventListener(
"unload",
function () {
resolve();
},
{ once: true }
);
- SidebarUI.hide();
+ SidebarController.hide();
});
}
add_task(async function testSyncedTabsSidebarList() {
- await SidebarUI.show("viewTabsSidebar");
+ await SidebarController.show("viewTabsSidebar");
Assert.equal(
- SidebarUI.currentID,
+ SidebarController.currentID,
"viewTabsSidebar",
"Sidebar should have SyncedTabs loaded"
);
let syncedTabsDeckComponent =
- SidebarUI.browser.contentWindow.syncedTabsDeckComponent;
+ SidebarController.browser.contentWindow.syncedTabsDeckComponent;
Assert.ok(syncedTabsDeckComponent, "component exists");
@@ -172,9 +172,9 @@ add_task(async function testSyncedTabsSidebarList() {
add_task(testClean);
add_task(async function testSyncedTabsSidebarFilteredList() {
- await SidebarUI.show("viewTabsSidebar");
+ await SidebarController.show("viewTabsSidebar");
let syncedTabsDeckComponent =
- window.SidebarUI.browser.contentWindow.syncedTabsDeckComponent;
+ window.SidebarController.browser.contentWindow.syncedTabsDeckComponent;
Assert.ok(syncedTabsDeckComponent, "component exists");
@@ -244,9 +244,9 @@ add_task(async function testSyncedTabsSidebarFilteredList() {
add_task(testClean);
add_task(async function testSyncedTabsSidebarStatus() {
- await SidebarUI.show("viewTabsSidebar");
+ await SidebarController.show("viewTabsSidebar");
let syncedTabsDeckComponent =
- window.SidebarUI.browser.contentWindow.syncedTabsDeckComponent;
+ window.SidebarController.browser.contentWindow.syncedTabsDeckComponent;
Assert.ok(syncedTabsDeckComponent, "component exists");
@@ -377,9 +377,9 @@ add_task(async function testSyncedTabsSidebarStatus() {
add_task(testClean);
add_task(async function testSyncedTabsSidebarContextMenu() {
- await SidebarUI.show("viewTabsSidebar");
+ await SidebarController.show("viewTabsSidebar");
let syncedTabsDeckComponent =
- window.SidebarUI.browser.contentWindow.syncedTabsDeckComponent;
+ window.SidebarController.browser.contentWindow.syncedTabsDeckComponent;
Assert.ok(syncedTabsDeckComponent, "component exists");
@@ -547,7 +547,8 @@ async function testContextMenu(
let chromeWindow = triggerElement.ownerGlobal.top;
let rect = triggerElement.getBoundingClientRect();
- let contentRect = chromeWindow.SidebarUI.browser.getBoundingClientRect();
+ let contentRect =
+ chromeWindow.SidebarController.browser.getBoundingClientRect();
// The offsets in `rect` are relative to the content window, but
// `synthesizeMouseAtPoint` calls `nsIDOMWindowUtils.sendMouseEvent`,
// which interprets the offsets relative to the containing *chrome* window.