merge: 合并最新 dev 分支(cloudflare-temp-email + iCloud)
- 解决 background.js / sidepanel.html / sidepanel.js / 测试文件共 24 处冲突 - LuckMail、Cloudflare Temp Email、iCloud 三种邮箱提供商正确共存 - step9 清理范围测试对齐 dev 分支行为(closeTabsByUrlPrefix 排除 OAuth callback URL) - LuckMail 测试补充 dev 分支新增依赖的 mock - 全部 76 个测试通过
This commit is contained in:
@@ -52,7 +52,12 @@ function extractFunction(name) {
|
||||
|
||||
const bundle = [
|
||||
extractFunction('getTabRegistry'),
|
||||
extractFunction('normalizeEmailGenerator'),
|
||||
extractFunction('parseUrlSafely'),
|
||||
extractFunction('isHotmailProvider'),
|
||||
extractFunction('isCustomMailProvider'),
|
||||
extractFunction('isGeneratedAliasProvider'),
|
||||
extractFunction('shouldUseCustomRegistrationEmail'),
|
||||
extractFunction('isLocalhostOAuthCallbackUrl'),
|
||||
extractFunction('isLocalhostOAuthCallbackTabMatch'),
|
||||
extractFunction('closeLocalhostCallbackTabs'),
|
||||
@@ -62,6 +67,9 @@ const bundle = [
|
||||
].join('\n');
|
||||
|
||||
const api = new Function(`
|
||||
const HOTMAIL_PROVIDER = 'hotmail-api';
|
||||
const CLOUDFLARE_TEMP_EMAIL_PROVIDER = 'cloudflare-temp-email';
|
||||
const CLOUDFLARE_TEMP_EMAIL_GENERATOR = 'cloudflare-temp-email';
|
||||
let currentState = {
|
||||
tabRegistry: {
|
||||
'signup-page': { tabId: 1, ready: true },
|
||||
@@ -122,6 +130,11 @@ async function addLog(message) {
|
||||
logMessages.push(message);
|
||||
}
|
||||
|
||||
async function finalizeIcloudAliasAfterSuccessfulFlow() {}
|
||||
function shouldUseCustomRegistrationEmail() {
|
||||
return false;
|
||||
}
|
||||
|
||||
${bundle}
|
||||
|
||||
return {
|
||||
@@ -183,8 +196,8 @@ return {
|
||||
let snapshot = api.snapshot();
|
||||
assert.deepStrictEqual(
|
||||
snapshot.removedBatches,
|
||||
[[1], [2, 3]],
|
||||
'handleStepData(9) 应先关闭当前 callback 页,再按同前缀路径清理残留页'
|
||||
[[1], [2]],
|
||||
'handleStepData(9) 应先关闭当前 callback 页,再按同源首段路径清理残留页'
|
||||
);
|
||||
assert.strictEqual(
|
||||
snapshot.currentState.tabRegistry['signup-page'],
|
||||
|
||||
Reference in New Issue
Block a user