Skip to content

Commit

Permalink
feat(chromium): roll Chromium to r848005 (#6801)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sadym-chromium committed Feb 2, 2021
1 parent 03db2cb commit 890d5c2
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/revisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ type Revisions = Readonly<{
}>;

export const PUPPETEER_REVISIONS: Revisions = {
chromium: '843427',
chromium: '848005',
firefox: 'latest',
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/golden-chromium/screenshot-offscreen-clip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/golden-firefox/screenshot-offscreen-clip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 27 additions & 5 deletions test/screenshot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 1 addition & 0 deletions versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 890d5c2

Please sign in to comment.