修复设置自动保存与标签清理边界

This commit is contained in:
QLHazyCoder
2026-05-20 05:15:56 +08:00
119 changed files with 24116 additions and 3966 deletions
+19
View File
@@ -209,6 +209,25 @@ return {
assert.deepStrictEqual(snapshot.removedBatches, [[11, 12]]);
assert.strictEqual(snapshot.currentState.tabRegistry['signup-page'], null);
api.reset({
tabs: [
{ id: 21, active: true, url: 'https://chatgpt.com/' },
{ id: 22, active: false, url: 'https://auth.openai.com/authorize?client_id=test' },
],
state: {
sourceLastUrls: {
'signup-page': 'https://auth.openai.com/authorize?client_id=test',
},
tabRegistry: {},
},
});
await api.closeConflictingTabsForSource('signup-page', 'https://chatgpt.com/');
snapshot = api.snapshot();
assert.deepStrictEqual(snapshot.removedBatches, [[21, 22]]);
assert.deepStrictEqual(snapshot.currentTabs, []);
console.log('signup page tab cleanup tests passed');
})().catch((error) => {
console.error(error);