Keep browser sign-ins across tabs and restarts (#2089)
* feat(desktop): share persistent browser data across tabs Keep browser sign-ins and site storage across tabs and app restarts, with a Settings action to clear the shared profile. * fix(settings): prevent duplicate browser data clears * fix(desktop): complete browser data cleanup Clear legacy per-tab profiles after upgrades and localize the browser data settings in every supported language. * fix(desktop): close browser profile cleanup races
This commit is contained in:
@@ -26,4 +26,18 @@ describe("PaseoBrowserWebviewRegistry", () => {
|
||||
|
||||
expect(registry.getWebContentsIdForBrowser("browser-a")).toBe(2);
|
||||
});
|
||||
|
||||
it("keeps one browser identity per webContents target", () => {
|
||||
const registry = new PaseoBrowserWebviewRegistry();
|
||||
|
||||
registry.registerWebContents({ webContentsId: 1, browserId: "browser-a" });
|
||||
registry.registerWorkspace({ browserId: "browser-a", workspaceId: "workspace-a" });
|
||||
registry.setWorkspaceActiveBrowser({ workspaceId: "workspace-a", browserId: "browser-a" });
|
||||
registry.registerWebContents({ webContentsId: 1, browserId: "browser-b" });
|
||||
|
||||
expect(registry.getWebContentsIdForBrowser("browser-a")).toBeNull();
|
||||
expect(registry.getWorkspaceId("browser-a")).toBeNull();
|
||||
expect(registry.getWorkspaceActiveBrowserId("workspace-a")).toBeNull();
|
||||
expect(registry.getBrowserIdForWebContents(1)).toBe("browser-b");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user