test: fix webkit win expectation for sameSite attribute (#8559)

This commit is contained in:
Yury Semikhatsky 2021-08-30 12:01:22 -07:00 committed by GitHub
parent b6b9b4c170
commit 4c1b47a00c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ it('should add cookies from Set-Cookie header', async ({context, page, server})
expect((await page.evaluate(() => document.cookie)).split(';').map(s => s.trim()).sort()).toEqual(['foo=bar', 'session=value']);
});
it('should handle cookies on redirects', async ({context, server}) => {
it('should handle cookies on redirects', async ({context, server, browserName, isWindows}) => {
server.setRoute('/redirect1', (req, res) => {
res.setHeader('Set-Cookie', 'r1=v1;SameSite=Lax');
res.writeHead(301, { location: '/a/b/redirect2' });
@ -174,7 +174,7 @@ it('should handle cookies on redirects', async ({context, server}) => {
const cookies = await context.cookies();
expect(new Set(cookies)).toEqual(new Set([
{
'sameSite': 'Lax',
'sameSite': (browserName === 'webkit' && isWindows) ? 'None' : 'Lax',
'name': 'r2',
'value': 'v2',
'domain': 'localhost',
@ -184,7 +184,7 @@ it('should handle cookies on redirects', async ({context, server}) => {
'secure': false
},
{
'sameSite': 'Lax',
'sameSite': (browserName === 'webkit' && isWindows) ? 'None' : 'Lax',
'name': 'r1',
'value': 'v1',
'domain': 'localhost',