mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-30 02:11:30 +00:00
chore: Run lint and fund dependencies, p=#12718
This commit is contained in:
@@ -10,7 +10,11 @@ add_task(async function test_SimpleLabelChange() {
|
||||
await runSyncAction(
|
||||
() => {
|
||||
gBrowser._setTabLabel(newTab, newLabel);
|
||||
Assert.equal(newTab.label, newLabel, "The original tab label should be changed");
|
||||
Assert.equal(
|
||||
newTab.label,
|
||||
newLabel,
|
||||
"The original tab label should be changed"
|
||||
);
|
||||
},
|
||||
async () => {
|
||||
Assert.equal(
|
||||
|
||||
@@ -9,6 +9,10 @@ add_task(async function test_SimpleTabOpen() {
|
||||
let otherTab = gZenWindowSync.getItemFromWindow(win, tabId);
|
||||
Assert.ok(otherTab, "The opened tab should be found in the synced window");
|
||||
Assert.ok(newTab._zenContentsVisible, "The opened tab should be visible");
|
||||
Assert.equal(otherTab.id, tabId, "The opened tab ID should match the synced tab ID");
|
||||
Assert.equal(
|
||||
otherTab.id,
|
||||
tabId,
|
||||
"The opened tab ID should match the synced tab ID"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ async function withNewSyncedWindow(action) {
|
||||
}
|
||||
|
||||
async function runSyncAction(action, callback, type) {
|
||||
await new Promise((resolve) => {
|
||||
await new Promise(resolve => {
|
||||
window.gZenWindowSync.addSyncHandler(async function handler(aEvent) {
|
||||
if (aEvent.type === type) {
|
||||
window.gZenWindowSync.removeSyncHandler(handler);
|
||||
@@ -29,12 +29,14 @@ function getTabState(tab) {
|
||||
|
||||
async function withNewTabAndWindow(action) {
|
||||
let newTab = null;
|
||||
await withNewSyncedWindow(async (win) => {
|
||||
await withNewSyncedWindow(async win => {
|
||||
await runSyncAction(
|
||||
() => {
|
||||
newTab = gBrowser.addTrustedTab("https://example.com/", { inBackground: true });
|
||||
newTab = gBrowser.addTrustedTab("https://example.com/", {
|
||||
inBackground: true,
|
||||
});
|
||||
},
|
||||
async (aEvent) => {
|
||||
async aEvent => {
|
||||
Assert.equal(aEvent.type, "TabOpen", "Event type should be TabOpen");
|
||||
await action(newTab, win);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user