Skip to content

Commit f7df42b

Browse files
committed
use addToEssentials and remove redudant workspace assignment
1 parent acd5fdc commit f7df42b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/zen/tests/spaces/browser_unload_all_other_spaces.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ add_task(async function test_UnloadAllOtherWorkspace_essentials() {
127127
true,
128128
{ skipAnimation: true }
129129
);
130-
tab.setAttribute("zen-workspace-id", inactiveWorkspaceId);
131-
tab.setAttribute("zen-essential", "true");
130+
gZenPinnedTabManager.addToEssentials(tab);
132131
inactiveWorkspaceTabs.push(tab);
133132
}
134133

@@ -155,6 +154,13 @@ add_task(async function test_UnloadAllOtherWorkspace_essentials() {
155154
"Essential Tab in inactive workspace should have linked panel"
156155
);
157156
}
157+
for (const tab of inactiveWorkspaceTabs) {
158+
gZenPinnedTabManager.removeEssentials(tab);
159+
160+
}
161+
for (const tab of activeWorkspaceTabs) {
162+
gZenPinnedTabManager.removeEssentials(tab);
163+
}
158164
await gZenWorkspaces.removeWorkspace(inactiveWorkspaceId);
159165
await gZenWorkspaces.removeWorkspace(activeWorkspaceId);
160166
});

0 commit comments

Comments
 (0)