Skip to content

Commit 4340098

Browse files
authored
test(bidi): add Firefox prefs for proxying localhost in BiDi tests (microsoft#36824)
1 parent 5144198 commit 4340098

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/bidi/playwright.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ const trace = !!process.env.PWTEST_TRACE;
2727
const hasDebugOutput = process.env.DEBUG?.includes('pw:');
2828

2929
function firefoxUserPrefs() {
30+
const defaultPrefs = {
31+
'network.proxy.allow_hijacking_localhost': true,
32+
'network.proxy.testing_localhost_is_secure_when_hijacked': true,
33+
};
3034
const prefsString = process.env.PWTEST_FIREFOX_USER_PREFS;
3135
if (!prefsString)
32-
return undefined;
33-
return JSON.parse(prefsString);
36+
return defaultPrefs;
37+
return { ...defaultPrefs, ...JSON.parse(prefsString) };
3438
}
3539

3640
const outputDir = path.join(__dirname, '..', '..', 'test-results');

0 commit comments

Comments
 (0)