fix(stealth): 修复 launch 选项与测试基线不一致问题

在 stealth 默认策略下保留自定义 user-agent,不再被 CDP 覆盖。

同步更新 protocol/browser/launch/file-access 相关测试预期,并放宽 browser.test 的 hook 超时以消除偶发超时。
This commit is contained in:
leeguooooo
2026-02-24 17:42:12 +09:00
parent aef8fcc038
commit ec011f46ff
6 changed files with 48 additions and 30 deletions
+2 -2
View File
@@ -146,9 +146,9 @@ describe('File Access (Issue #345)', () => {
const content = await page.locator('h1').textContent();
expect(content).toBe('Test File Access');
// Verify webdriver is hidden (from custom arg)
// Verify webdriver is hidden under stealth defaults
const webdriver = await page.evaluate(() => navigator.webdriver);
expect(webdriver).toBe(false);
expect(webdriver).toBeUndefined();
});
});
});