feat(chromium): roll Chromium to r848005 (#6801)

This corresponds to Chromium 90.0.4403.0
This roll includes:
- Cut screenshot by ViewPort size, not position (crrev.com/c/2643792)

BREAKING CHANGE:
- `page.screenshot` cuts screenshot content by the ViewPort size, not ViewPort position.
This commit is contained in:
Maksim Sadym 2021-02-02 17:24:10 +01:00 committed by GitHub
parent 03db2cbf2f
commit 890d5c2e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 7 deletions

View File

@ -47,7 +47,7 @@
"license": "Apache-2.0",
"dependencies": {
"debug": "^4.1.0",
"devtools-protocol": "0.0.842839",
"devtools-protocol": "0.0.847576",
"extract-zip": "^2.0.0",
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",

View File

@ -20,6 +20,6 @@ type Revisions = Readonly<{
}>;
export const PUPPETEER_REVISIONS: Revisions = {
chromium: '843427',
chromium: '848005',
firefox: 'latest',
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 279 B

View File

@ -50,21 +50,43 @@ describe('Screenshots', function () {
});
expect(screenshot).toBeGolden('screenshot-clip-rect.png');
});
itFailsFirefox('should clip elements to the viewport', async () => {
// TODO: enable after the screenshot is fixed.
// https://crbug.com/1173457
it.skip('should clip elements to the viewport size without artefacts', 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: 25,
y: 25,
width: 100,
height: 100,
},
});
expect(screenshot).toBeGolden('screenshot-offscreen-clip.png');
});
// TODO: remove after the screenshot is fixed.
// https://crbug.com/1173457
itFailsFirefox(
'should clip elements to the viewport size with artefacts',
async () => {
const { page, server } = getTestState();
await page.setViewport({ width: 50, height: 50 });
await page.goto(server.PREFIX + '/grid.html');
const screenshot = await page.screenshot({
clip: {
x: 25,
y: 25,
width: 100,
height: 100,
},
});
expect(screenshot).toBeGolden(
'screenshot-offscreen-clip-artefacts.png'
);
}
);
it('should run in parallel', async () => {
const { page, server } = getTestState();

View File

@ -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.
['90.0.4403.0', 'NEXT'],
['89.0.4389.0', 'v6.0.0'],
['88.0.4298.0', 'v5.5.0'],
['87.0.4272.0', 'v5.4.0'],