feat(chromium-tip-of-tree): roll Chromium TOT to 1008 (#14279)

This commit is contained in:
Andrey Lushnikov 2022-05-19 10:29:44 -06:00 committed by GitHub
parent fd452058bb
commit 9a73dfe773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View File

@ -15,9 +15,9 @@
},
{
"name": "chromium-tip-of-tree",
"revision": "1007",
"revision": "1008",
"installByDefault": false,
"browserVersion": "104.0.5067.0"
"browserVersion": "104.0.5071.0"
},
{
"name": "firefox",

View File

@ -40,7 +40,7 @@ it('should get a cookie @smoke', async ({ context, page, server, defaultSameSite
}]);
});
it('should get a non-session cookie', async ({ context, page, server, defaultSameSiteCookieValue }) => {
it('should get a non-session cookie', async ({ context, page, server, defaultSameSiteCookieValue, browserName, browserMajorVersion }) => {
await page.goto(server.EMPTY_PAGE);
// @see https://en.wikipedia.org/wiki/Year_2038_problem
const date = +(new Date('1/1/2038'));
@ -50,16 +50,26 @@ it('should get a non-session cookie', async ({ context, page, server, defaultSam
return document.cookie;
}, date);
expect(documentCookie).toBe('username=John Doe');
expect(await context.cookies()).toEqual([{
const cookies = await context.cookies();
expect(cookies.length).toBe(1);
expect(cookies[0]).toEqual({
name: 'username',
value: 'John Doe',
domain: 'localhost',
path: '/',
expires: date / 1000,
// We will check this separately.
expires: expect.anything(),
httpOnly: false,
secure: false,
sameSite: defaultSameSiteCookieValue,
}]);
});
// Browsers start to cap cookies with 400 days max expires value.
// See https://github.com/httpwg/http-extensions/pull/1732
// Chromium patch: https://chromium.googlesource.com/chromium/src/+/aaa5d2b55478eac2ee642653dcd77a50ac3faff6
// We want to make sure that expires date is at least 400 days in future.
const FOUR_HUNDRED_DAYS = 1000 * 60 * 60 * 24 * 400;
const FIVE_MINUTES = 1000 * 60 * 5; // relax condition a bit to make sure test is not flaky.
expect(cookies[0].expires).toBeGreaterThan((Date.now() + FOUR_HUNDRED_DAYS - FIVE_MINUTES) / 1000);
});
it('should properly report httpOnly cookie', async ({ context, page, server }) => {