chore: remove unused 'x-playwright-reuse-context' header (#35414)

This commit is contained in:
Max Schmitt 2025-03-31 08:28:09 +01:00 committed by GitHub
parent e2c8163b14
commit 81c6af0cc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -96,7 +96,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
playwright._defaultLaunchOptions = undefined;
}, { scope: 'worker', auto: true, box: true }],
browser: [async ({ playwright, browserName, _browserOptions, connectOptions, _reuseContext }, use, testInfo) => {
browser: [async ({ playwright, browserName, _browserOptions, connectOptions }, use, testInfo) => {
if (!['chromium', 'firefox', 'webkit', '_bidiChromium', '_bidiFirefox'].includes(browserName))
throw new Error(`Unexpected browserName "${browserName}", must be one of "chromium", "firefox" or "webkit"`);
@ -105,7 +105,6 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
...connectOptions,
exposeNetwork: connectOptions.exposeNetwork ?? (connectOptions as any)._exposeNetwork,
headers: {
...(_reuseContext ? { 'x-playwright-reuse-context': '1' } : {}),
// HTTP headers are ASCII only (not UTF-8).
'x-playwright-launch-options': jsonStringifyForceASCII(_browserOptions),
...connectOptions.headers,

View File

@ -52,7 +52,6 @@ const test = baseTest.extend<Fixtures>({
const browser = await browserType.connect(wsEndpoint, {
headers: {
'x-playwright-launch-options': JSON.stringify((browserType as any)._playwright._defaultLaunchOptions),
'x-playwright-reuse-context': '1',
},
}) as BrowserWithReuse;
browsers.push(browser);