From bf354f565171d8ddfd46eba54c3629e146501aac Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Fri, 29 Jan 2021 10:47:59 +0000 Subject: [PATCH 01/13] Add `SameParty` attribute to cookies Breaking CL: https://chromium-review.googlesource.com/c/chromium/src/+/2598846 --- test/cookies.spec.ts | 11 +++++++++++ test/defaultbrowsercontext.spec.ts | 3 +++ 2 files changed, 14 insertions(+) diff --git a/test/cookies.spec.ts b/test/cookies.spec.ts index 27edbd5ad8141..29f4ad98f6f16 100644 --- a/test/cookies.spec.ts +++ b/test/cookies.spec.ts @@ -43,6 +43,7 @@ describe('Cookie specs', () => { value: 'John Doe', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 16, httpOnly: false, @@ -99,6 +100,7 @@ describe('Cookie specs', () => { value: '1234', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 12, httpOnly: false, @@ -110,6 +112,7 @@ describe('Cookie specs', () => { value: 'John Doe', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 16, httpOnly: false, @@ -145,6 +148,7 @@ describe('Cookie specs', () => { value: 'tweets', domain: 'baz.com', path: '/', + sameParty: false, expires: -1, size: 11, httpOnly: false, @@ -156,6 +160,7 @@ describe('Cookie specs', () => { value: 'woofs', domain: 'foo.com', path: '/', + sameParty: false, expires: -1, size: 10, httpOnly: false, @@ -248,6 +253,7 @@ describe('Cookie specs', () => { value: '123456', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 14, httpOnly: false, @@ -271,6 +277,7 @@ describe('Cookie specs', () => { value: 'GRID', domain: 'localhost', path: '/grid.html', + sameParty: false, expires: -1, size: 14, httpOnly: false, @@ -376,6 +383,7 @@ describe('Cookie specs', () => { value: 'best', domain: 'www.example.com', path: '/', + sameParty: false, expires: -1, size: 18, httpOnly: false, @@ -414,6 +422,7 @@ describe('Cookie specs', () => { value: 'best', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 20, httpOnly: false, @@ -428,6 +437,7 @@ describe('Cookie specs', () => { value: 'worst', domain: '127.0.0.1', path: '/', + sameParty: false, expires: -1, size: 15, httpOnly: false, @@ -479,6 +489,7 @@ describe('Cookie specs', () => { value: 'best', domain: '127.0.0.1', path: '/', + sameParty: false, expires: -1, size: 24, httpOnly: false, diff --git a/test/defaultbrowsercontext.spec.ts b/test/defaultbrowsercontext.spec.ts index 01dec7f3f4a88..bd695d30dff5d 100644 --- a/test/defaultbrowsercontext.spec.ts +++ b/test/defaultbrowsercontext.spec.ts @@ -37,6 +37,7 @@ describe('DefaultBrowserContext', function () { value: 'John Doe', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 16, httpOnly: false, @@ -62,6 +63,7 @@ describe('DefaultBrowserContext', function () { value: 'John Doe', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 16, httpOnly: false, @@ -93,6 +95,7 @@ describe('DefaultBrowserContext', function () { value: '1', domain: 'localhost', path: '/', + sameParty: false, expires: -1, size: 8, httpOnly: false, From dba818c18c5665e9aa7d091b8abc96e000a36066 Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Fri, 29 Jan 2021 11:29:16 +0000 Subject: [PATCH 02/13] Anchor target=_blank implies rel=noopener Breaking CL: https://chromium-review.googlesource.com/c/chromium/src/+/1630010 --- test/page.spec.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/page.spec.ts b/test/page.spec.ts index 18a653e693ca7..d7af03fcc050b 100644 --- a/test/page.spec.ts +++ b/test/page.spec.ts @@ -176,7 +176,7 @@ describe('Page', function () { expect(await page.evaluate(() => !!window.opener)).toBe(false); expect(await popup.evaluate(() => !!window.opener)).toBe(false); }); - it('should work with clicking target=_blank', async () => { + it('should work with clicking target=_blank and whithout rel=opener', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); @@ -186,6 +186,18 @@ describe('Page', function () { page.click('a'), ]); expect(await page.evaluate(() => !!window.opener)).toBe(false); + expect(await popup.evaluate(() => !!window.opener)).toBe(false); + }); + it('should work with clicking target=_blank and whith rel=opener', async () => { + const { page, server } = getTestState(); + + await page.goto(server.EMPTY_PAGE); + await page.setContent('yo'); + const [popup] = await Promise.all([ + new Promise((x) => page.once('popup', x)), + page.click('a'), + ]); + expect(await page.evaluate(() => !!window.opener)).toBe(false); expect(await popup.evaluate(() => !!window.opener)).toBe(true); }); it('should work with fake-clicking target=_blank and rel=noopener', async () => { From 18895a9c4538b95162bd9c2968ae7648dd2d0cde Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Fri, 29 Jan 2021 15:17:22 +0000 Subject: [PATCH 03/13] Cut screenshot by ViewPort size, not position. Breaking CL: https://chromium-review.googlesource.com/c/chromium/src/+/2643792 --- .../screenshot-offscreen-clip.png | Bin 326 -> 688 bytes test/screenshot.spec.ts | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/golden-chromium/screenshot-offscreen-clip.png b/test/golden-chromium/screenshot-offscreen-clip.png index 31a0935cda7dee10bb848bf981f26efe041edb1f..998dafb7d84cf1bf2dd75c92e8a647a604082269 100644 GIT binary patch literal 688 zcmeAS@N?(olHy`uVBq!ia0vp^DImV9N4zaSW-L z^Y)HmMpU3g+r#sZ#HQtMmw!p%w;Dj28+D8a14&h_vL zditZ{{_h{^i*M%KkG?U}{P#VEZGuO59M1?4Abd6`lz-lNZN=@p ze^l<;_1CjKFCA9v+TPc6vvR`K_X6u>9@M8kceIm{^O|%|Ugpoo@0(qct}8DVdc*Vc z*N+{gdt>yb`Ym_v?RJ}>@Utea`Cvl!+Uu`1r+T$Yh)-2;eD!tLvBw+r*qQIH57UZ` z&$gPo>TX^;P%5QkcAcgD^;gf_dflAo`ngZK^0w^j#}^t$cC29GRPqcL7vEJ?!BP4< z-Y_s%ifbNgk>ejQ^LLuY}3Aoeo|ZpfSy*Snz}m;@O-UHx3v IIVCg!00Kf40{{R3 literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^DImBI42E5#xo|41ePP)|E diff --git a/test/screenshot.spec.ts b/test/screenshot.spec.ts index fbe500976c515..0da3b6d43a46e 100644 --- a/test/screenshot.spec.ts +++ b/test/screenshot.spec.ts @@ -50,15 +50,15 @@ describe('Screenshots', function () { }); expect(screenshot).toBeGolden('screenshot-clip-rect.png'); }); - itFailsFirefox('should clip elements to the viewport', async () => { + itFailsFirefox('should clip elements to the viewport size', async () => { const { page, server } = getTestState(); - await page.setViewport({ width: 500, height: 500 }); + await page.setViewport({ width: 50, height: 50 }); await page.goto(server.PREFIX + '/grid.html'); const screenshot = await page.screenshot({ clip: { - x: 50, - y: 600, + x: 0, + y: 0, width: 100, height: 100, }, From 05241ef50b9137830cf90b932df86952b99c57ca Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 10:44:33 +0000 Subject: [PATCH 04/13] Don't expect ignored elements in the AXTree Breaking CL: https://chromium-review.googlesource.com/c/chromium/src/+/2505362 --- test/ariaqueryhandler.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ariaqueryhandler.spec.ts b/test/ariaqueryhandler.spec.ts index 93e2a9f2334db..576dedf2623bb 100644 --- a/test/ariaqueryhandler.spec.ts +++ b/test/ariaqueryhandler.spec.ts @@ -563,13 +563,13 @@ describeChromeOnly('AriaQueryHandler', () => { const { page } = getTestState(); const found = await page.$$('aria/[role="heading"]'); const ids = await getIds(found); - expect(ids).toEqual(['shown', 'hidden', 'node11', 'node13']); + expect(ids).toEqual(['shown', 'node11', 'node13']); }); - it('should find both ignored and unignored', async () => { + it('should not find ignored', async () => { const { page } = getTestState(); const found = await page.$$('aria/title'); const ids = await getIds(found); - expect(ids).toEqual(['shown', 'hidden']); + expect(ids).toEqual(['shown']); }); }); }); From f66a3e86bb1169fb4ab041ae839051c3559d5f36 Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 10:45:20 +0000 Subject: [PATCH 05/13] Update Chrome and CDP versions. --- package.json | 2 +- src/revisions.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b64a8cd91c76..d5f669d3a35df 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "license": "Apache-2.0", "dependencies": { "debug": "^4.1.0", - "devtools-protocol": "0.0.818844", + "devtools-protocol": "0.0.847576", "extract-zip": "^2.0.0", "https-proxy-agent": "^5.0.0", "node-fetch": "^2.6.1", diff --git a/src/revisions.ts b/src/revisions.ts index 5e9169adb0c8f..6a524c707c68f 100644 --- a/src/revisions.ts +++ b/src/revisions.ts @@ -20,6 +20,6 @@ type Revisions = Readonly<{ }>; export const PUPPETEER_REVISIONS: Revisions = { - chromium: '818858', + chromium: '848005', firefox: 'latest', }; From 7b4b37970962d346ab09aa6e24f9cdf7b3f710cc Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 11:13:31 +0000 Subject: [PATCH 06/13] update versions.js --- versions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.js b/versions.js index 003b3854dfd11..8dac4c1fe52ff 100644 --- a/versions.js +++ b/versions.js @@ -17,6 +17,7 @@ const versionsPerRelease = new Map([ // This is a mapping from Chromium version => Puppeteer version. // In Chromium roll patches, use 'NEXT' for the Puppeteer version. + ['88.0.4298.0', 'NEXT'], ['88.0.4298.0', 'v5.5.0'], ['87.0.4272.0', 'v5.4.0'], ['86.0.4240.0', 'v5.3.0'], From f8ec52f2ac22ccc9648979861dd7e709ab36d5ee Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 11:34:06 +0000 Subject: [PATCH 07/13] update versions.js --- versions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.js b/versions.js index 8dac4c1fe52ff..74fbcb988a5e7 100644 --- a/versions.js +++ b/versions.js @@ -17,7 +17,7 @@ const versionsPerRelease = new Map([ // This is a mapping from Chromium version => Puppeteer version. // In Chromium roll patches, use 'NEXT' for the Puppeteer version. - ['88.0.4298.0', 'NEXT'], + ['90.0.4403.0', 'NEXT'], ['88.0.4298.0', 'v5.5.0'], ['87.0.4272.0', 'v5.4.0'], ['86.0.4240.0', 'v5.3.0'], From 7fe725d3733f4b0a11ca5d8ff0726352ecdce8ff Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 12:25:49 +0000 Subject: [PATCH 08/13] Misspelings --- test/page.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/page.spec.ts b/test/page.spec.ts index d7af03fcc050b..d7c8bc55d4241 100644 --- a/test/page.spec.ts +++ b/test/page.spec.ts @@ -176,7 +176,7 @@ describe('Page', function () { expect(await page.evaluate(() => !!window.opener)).toBe(false); expect(await popup.evaluate(() => !!window.opener)).toBe(false); }); - it('should work with clicking target=_blank and whithout rel=opener', async () => { + it('should work with clicking target=_blank and without rel=opener', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); @@ -188,7 +188,7 @@ describe('Page', function () { expect(await page.evaluate(() => !!window.opener)).toBe(false); expect(await popup.evaluate(() => !!window.opener)).toBe(false); }); - it('should work with clicking target=_blank and whith rel=opener', async () => { + it('should work with clicking target=_blank and with rel=opener', async () => { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); From 1ed4450dada7e7bb7e93fcf9c066e8fd98164b1c Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 13:16:14 +0000 Subject: [PATCH 09/13] eslint --- test/page.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/page.spec.ts b/test/page.spec.ts index d7c8bc55d4241..b190518fcc7b5 100644 --- a/test/page.spec.ts +++ b/test/page.spec.ts @@ -192,7 +192,9 @@ describe('Page', function () { const { page, server } = getTestState(); await page.goto(server.EMPTY_PAGE); - await page.setContent('yo'); + await page.setContent( + 'yo' + ); const [popup] = await Promise.all([ new Promise((x) => page.once('popup', x)), page.click('a'), From 87d6644f481a1d86db091a2fcbcf85ee4eca0988 Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 13:29:59 +0000 Subject: [PATCH 10/13] Skip sending data urls in the Runtime domain Breaking CL: https://chromium-review.googlesource.com/c/v8/v8/+/2621077 --- test/worker.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/worker.spec.ts b/test/worker.spec.ts index 2c5827361b52e..b4f81dbb8cf04 100644 --- a/test/worker.spec.ts +++ b/test/worker.spec.ts @@ -79,7 +79,7 @@ describeFailsFirefox('Workers', function () { ]); expect(message.text()).toBe('1'); expect(message.location()).toEqual({ - url: 'data:text/javascript,console.log(1)', + url: '', lineNumber: 0, columnNumber: 8, }); From 403ec1b388b1ccec6128fbae020e7cf38738c8ef Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 13:55:52 +0000 Subject: [PATCH 11/13] Revert "Update Chrome and CDP versions." This reverts commit f66a3e86bb1169fb4ab041ae839051c3559d5f36. --- package.json | 2 +- src/revisions.ts | 2 +- versions.js | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d5f669d3a35df..8b64a8cd91c76 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "license": "Apache-2.0", "dependencies": { "debug": "^4.1.0", - "devtools-protocol": "0.0.847576", + "devtools-protocol": "0.0.818844", "extract-zip": "^2.0.0", "https-proxy-agent": "^5.0.0", "node-fetch": "^2.6.1", diff --git a/src/revisions.ts b/src/revisions.ts index 6a524c707c68f..5e9169adb0c8f 100644 --- a/src/revisions.ts +++ b/src/revisions.ts @@ -20,6 +20,6 @@ type Revisions = Readonly<{ }>; export const PUPPETEER_REVISIONS: Revisions = { - chromium: '848005', + chromium: '818858', firefox: 'latest', }; diff --git a/versions.js b/versions.js index 74fbcb988a5e7..003b3854dfd11 100644 --- a/versions.js +++ b/versions.js @@ -17,7 +17,6 @@ const versionsPerRelease = new Map([ // This is a mapping from Chromium version => Puppeteer version. // In Chromium roll patches, use 'NEXT' for the Puppeteer version. - ['90.0.4403.0', 'NEXT'], ['88.0.4298.0', 'v5.5.0'], ['87.0.4272.0', 'v5.4.0'], ['86.0.4240.0', 'v5.3.0'], From 6c04349127a59faa30a49a56ac85000e4a982aff Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 14:21:17 +0000 Subject: [PATCH 12/13] feat(chromium): roll Chromium to r843427 --- package.json | 2 +- src/revisions.ts | 2 +- versions.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b64a8cd91c76..8bdd2960e4ebb 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "license": "Apache-2.0", "dependencies": { "debug": "^4.1.0", - "devtools-protocol": "0.0.818844", + "devtools-protocol": "0.0.842839", "extract-zip": "^2.0.0", "https-proxy-agent": "^5.0.0", "node-fetch": "^2.6.1", diff --git a/src/revisions.ts b/src/revisions.ts index 5e9169adb0c8f..eaeb33a134b30 100644 --- a/src/revisions.ts +++ b/src/revisions.ts @@ -20,6 +20,6 @@ type Revisions = Readonly<{ }>; export const PUPPETEER_REVISIONS: Revisions = { - chromium: '818858', + chromium: '843427', firefox: 'latest', }; diff --git a/versions.js b/versions.js index 003b3854dfd11..36c4c886dbd68 100644 --- a/versions.js +++ b/versions.js @@ -17,6 +17,7 @@ const versionsPerRelease = new Map([ // This is a mapping from Chromium version => Puppeteer version. // In Chromium roll patches, use 'NEXT' for the Puppeteer version. + ['89.0.4389.0', 'NEXT'], ['88.0.4298.0', 'v5.5.0'], ['87.0.4272.0', 'v5.4.0'], ['86.0.4240.0', 'v5.3.0'], From 71b87db701394f91662b8dc78c8621352d94f3bf Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Mon, 1 Feb 2021 14:43:36 +0000 Subject: [PATCH 13/13] Revert "Cut screenshot by ViewPort size, not position." This reverts commit 18895a9c4538b95162bd9c2968ae7648dd2d0cde. --- .../screenshot-offscreen-clip.png | Bin 688 -> 326 bytes test/screenshot.spec.ts | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/golden-chromium/screenshot-offscreen-clip.png b/test/golden-chromium/screenshot-offscreen-clip.png index 998dafb7d84cf1bf2dd75c92e8a647a604082269..31a0935cda7dee10bb848bf981f26efe041edb1f 100644 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^DImBI42E5#xo|41ePP)|E literal 688 zcmeAS@N?(olHy`uVBq!ia0vp^DImV9N4zaSW-L z^Y)HmMpU3g+r#sZ#HQtMmw!p%w;Dj28+D8a14&h_vL zditZ{{_h{^i*M%KkG?U}{P#VEZGuO59M1?4Abd6`lz-lNZN=@p ze^l<;_1CjKFCA9v+TPc6vvR`K_X6u>9@M8kceIm{^O|%|Ugpoo@0(qct}8DVdc*Vc z*N+{gdt>yb`Ym_v?RJ}>@Utea`Cvl!+Uu`1r+T$Yh)-2;eD!tLvBw+r*qQIH57UZ` z&$gPo>TX^;P%5QkcAcgD^;gf_dflAo`ngZK^0w^j#}^t$cC29GRPqcL7vEJ?!BP4< z-Y_s%ifbNgk>ejQ^LLuY}3Aoeo|ZpfSy*Snz}m;@O-UHx3v IIVCg!00Kf40{{R3 diff --git a/test/screenshot.spec.ts b/test/screenshot.spec.ts index 0da3b6d43a46e..fbe500976c515 100644 --- a/test/screenshot.spec.ts +++ b/test/screenshot.spec.ts @@ -50,15 +50,15 @@ describe('Screenshots', function () { }); expect(screenshot).toBeGolden('screenshot-clip-rect.png'); }); - itFailsFirefox('should clip elements to the viewport size', async () => { + itFailsFirefox('should clip elements to the viewport', async () => { const { page, server } = getTestState(); - await page.setViewport({ width: 50, height: 50 }); + await page.setViewport({ width: 500, height: 500 }); await page.goto(server.PREFIX + '/grid.html'); const screenshot = await page.screenshot({ clip: { - x: 0, - y: 0, + x: 50, + y: 600, width: 100, height: 100, },