test: add test for 'should parse cookie with large Max-Age correctly' (#30323)
This commit is contained in:
parent
01d4293803
commit
bff9f30b6f
|
@ -400,3 +400,30 @@ it('should support requestStorageAccess', async ({ page, server, channel, browse
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
it('should parse cookie with large Max-Age correctly', async ({ server, page, defaultSameSiteCookieValue, browserName, platform }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30305' });
|
||||
it.fixme(browserName === 'webkit' && platform === 'linux', 'https://github.com/microsoft/playwright/issues/30305');
|
||||
|
||||
server.setRoute('/foobar', (req, res) => {
|
||||
res.setHeader('set-cookie', [
|
||||
'cookie1=value1; Path=/; Expires=Thu, 08 Sep 2270 15:06:12 GMT; Max-Age=7776000000'
|
||||
]);
|
||||
res.statusCode = 200;
|
||||
res.end();
|
||||
});
|
||||
await page.goto(server.PREFIX + '/foobar');
|
||||
expect(await page.evaluate(() => document.cookie)).toBe('cookie1=value1');
|
||||
expect(await page.context().cookies()).toEqual([
|
||||
{
|
||||
name: 'cookie1',
|
||||
value: 'value1',
|
||||
domain: 'localhost',
|
||||
path: '/',
|
||||
expires: expect.any(Number),
|
||||
httpOnly: false,
|
||||
secure: false,
|
||||
sameSite: defaultSameSiteCookieValue,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue