chore: remove unused 'x-playwright-reuse-context' header (#35414)
This commit is contained in:
parent
e2c8163b14
commit
81c6af0cc6
|
@ -96,7 +96,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
|
||||||
playwright._defaultLaunchOptions = undefined;
|
playwright._defaultLaunchOptions = undefined;
|
||||||
}, { scope: 'worker', auto: true, box: true }],
|
}, { 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))
|
if (!['chromium', 'firefox', 'webkit', '_bidiChromium', '_bidiFirefox'].includes(browserName))
|
||||||
throw new Error(`Unexpected browserName "${browserName}", must be one of "chromium", "firefox" or "webkit"`);
|
throw new Error(`Unexpected browserName "${browserName}", must be one of "chromium", "firefox" or "webkit"`);
|
||||||
|
|
||||||
|
@ -105,7 +105,6 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
|
||||||
...connectOptions,
|
...connectOptions,
|
||||||
exposeNetwork: connectOptions.exposeNetwork ?? (connectOptions as any)._exposeNetwork,
|
exposeNetwork: connectOptions.exposeNetwork ?? (connectOptions as any)._exposeNetwork,
|
||||||
headers: {
|
headers: {
|
||||||
...(_reuseContext ? { 'x-playwright-reuse-context': '1' } : {}),
|
|
||||||
// HTTP headers are ASCII only (not UTF-8).
|
// HTTP headers are ASCII only (not UTF-8).
|
||||||
'x-playwright-launch-options': jsonStringifyForceASCII(_browserOptions),
|
'x-playwright-launch-options': jsonStringifyForceASCII(_browserOptions),
|
||||||
...connectOptions.headers,
|
...connectOptions.headers,
|
||||||
|
|
|
@ -52,7 +52,6 @@ const test = baseTest.extend<Fixtures>({
|
||||||
const browser = await browserType.connect(wsEndpoint, {
|
const browser = await browserType.connect(wsEndpoint, {
|
||||||
headers: {
|
headers: {
|
||||||
'x-playwright-launch-options': JSON.stringify((browserType as any)._playwright._defaultLaunchOptions),
|
'x-playwright-launch-options': JSON.stringify((browserType as any)._playwright._defaultLaunchOptions),
|
||||||
'x-playwright-reuse-context': '1',
|
|
||||||
},
|
},
|
||||||
}) as BrowserWithReuse;
|
}) as BrowserWithReuse;
|
||||||
browsers.push(browser);
|
browsers.push(browser);
|
||||||
|
|
Loading…
Reference in New Issue