Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chromium): roll to Chromium 92.0.4512.0 (r884014) #7288

Merged
merged 2 commits into from May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.md
Expand Up @@ -10,6 +10,7 @@

<!-- GEN:versions-per-release -->
- Releases per Chromium version:
* Chromium 92.0.4512.0 - [Puppeteer v9.1.1](https://github.com/puppeteer/puppeteer/blob/v9.1.1/docs/api.md)
* Chromium 91.0.4469.0 - [Puppeteer v9.0.0](https://github.com/puppeteer/puppeteer/blob/v9.0.0/docs/api.md)
* Chromium 90.0.4427.0 - [Puppeteer v8.0.0](https://github.com/puppeteer/puppeteer/blob/v8.0.0/docs/api.md)
* Chromium 90.0.4403.0 - [Puppeteer v7.0.0](https://github.com/puppeteer/puppeteer/blob/v7.0.0/docs/api.md)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -57,7 +57,7 @@
"license": "Apache-2.0",
"dependencies": {
"debug": "4.3.1",
"devtools-protocol": "0.0.869402",
"devtools-protocol": "0.0.883894",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.0",
"node-fetch": "2.6.1",
Expand Down
5 changes: 3 additions & 2 deletions src/common/Accessibility.ts
Expand Up @@ -437,10 +437,11 @@ class AXNode {
properties.get(key) as boolean;

for (const booleanProperty of booleanProperties) {
// WebArea's treat focus differently than other nodes. They report whether
// RootWebArea's treat focus differently than other nodes. They report whether
// their frame has focus, not whether focus is specifically on the root
// node.
if (booleanProperty === 'focused' && this._role === 'WebArea') continue;
if (booleanProperty === 'focused' && this._role === 'RootWebArea')
continue;
const value = getBooleanPropertyValue(booleanProperty);
if (!value) continue;
node[booleanProperty] = getBooleanPropertyValue(booleanProperty);
Expand Down
2 changes: 1 addition & 1 deletion src/common/AriaQueryHandler.ts
Expand Up @@ -32,7 +32,7 @@ async function queryAXTree(
role,
});
const filteredNodes: Protocol.Accessibility.AXNode[] = nodes.filter(
(node: Protocol.Accessibility.AXNode) => node.role.value !== 'text'
(node: Protocol.Accessibility.AXNode) => node.role.value !== 'StaticText'
);
return filteredNodes;
}
Expand Down
8 changes: 8 additions & 0 deletions src/common/Connection.ts
Expand Up @@ -126,12 +126,20 @@ export class Connection extends EventEmitter {
);
this._sessions.set(sessionId, session);
this.emit('sessionattached', session);
const parentSession = this._sessions.get(object.sessionId);
if (parentSession) {
parentSession.emit('sessionattached', session);
}
} else if (object.method === 'Target.detachedFromTarget') {
const session = this._sessions.get(object.params.sessionId);
if (session) {
session._onClosed();
this._sessions.delete(object.params.sessionId);
this.emit('sessiondetached', session);
const parentSession = this._sessions.get(object.sessionId);
if (parentSession) {
parentSession.emit('sessiondetached', session);
}
}
}
if (object.sessionId) {
Expand Down
2 changes: 1 addition & 1 deletion src/revisions.ts
Expand Up @@ -20,6 +20,6 @@ type Revisions = Readonly<{
}>;

export const PUPPETEER_REVISIONS: Revisions = {
chromium: '869685',
chromium: '884014',
firefox: 'latest',
};
7 changes: 7 additions & 0 deletions test/CDPSession.spec.ts
Expand Up @@ -103,4 +103,11 @@ describeChromeOnly('Target.createCDPSession', function () {
await client.send('ThisCommand.DoesNotExist');
}
});

it('should expose the underlying connection', async () => {
const { page } = getTestState();

const client = await page.target().createCDPSession();
expect(client.connection()).toBeTruthy();
});
});
42 changes: 11 additions & 31 deletions test/accessibility.spec.ts
Expand Up @@ -87,10 +87,10 @@ describeFailsFirefox('Accessibility', function () {
],
}
: {
role: 'WebArea',
role: 'RootWebArea',
name: 'Accessibility Test',
children: [
{ role: 'text', name: 'Hello World' },
{ role: 'StaticText', name: 'Hello World' },
{ role: 'heading', name: 'Inputs', level: 1 },
{ role: 'textbox', name: 'Empty input', focused: true },
{ role: 'textbox', name: 'readonly input', readonly: true },
Expand Down Expand Up @@ -148,7 +148,7 @@ describeFailsFirefox('Accessibility', function () {
name: '',
children: [
{
role: 'text',
role: 'StaticText',
name: 'hi',
},
],
Expand Down Expand Up @@ -230,7 +230,7 @@ describeFailsFirefox('Accessibility', function () {
],
}
: {
role: 'WebArea',
role: 'RootWebArea',
name: '',
children: [
{
Expand Down Expand Up @@ -263,7 +263,7 @@ describeFailsFirefox('Accessibility', function () {
name: 'Edit this image: ',
},
{
role: 'text',
role: 'StaticText',
name: 'my fake image',
},
],
Expand All @@ -274,7 +274,7 @@ describeFailsFirefox('Accessibility', function () {
value: 'Edit this image: ',
children: [
{
role: 'text',
role: 'StaticText',
name: 'Edit this image:',
},
{
Expand All @@ -300,7 +300,7 @@ describeFailsFirefox('Accessibility', function () {
value: 'Edit this image: my fake image',
children: [
{
role: 'text',
role: 'StaticText',
name: 'my fake image',
},
],
Expand All @@ -309,9 +309,10 @@ describeFailsFirefox('Accessibility', function () {
role: 'textbox',
name: '',
value: 'Edit this image: ',
multiline: true,
children: [
{
role: 'text',
role: 'StaticText',
name: 'Edit this image:',
},
{
Expand All @@ -336,28 +337,7 @@ describeFailsFirefox('Accessibility', function () {
role: 'textbox',
name: '',
value: 'Edit this image:',
});
});
it('plain text field without role should not have content', async () => {
const { page } = getTestState();

await page.setContent(`
<div contenteditable="plaintext-only">Edit this image:<img src="fakeimage.png" alt="my fake image"></div>`);
const snapshot = await page.accessibility.snapshot();
expect(snapshot.children[0]).toEqual({
role: 'generic',
name: '',
});
});
it('plain text field with tabindex and without role should not have content', async () => {
const { page } = getTestState();

await page.setContent(`
<div contenteditable="plaintext-only" tabIndex=0>Edit this image:<img src="fakeimage.png" alt="my fake image"></div>`);
const snapshot = await page.accessibility.snapshot();
expect(snapshot.children[0]).toEqual({
role: 'generic',
name: '',
multiline: true,
});
});
});
Expand Down Expand Up @@ -502,7 +482,7 @@ describeFailsFirefox('Accessibility', function () {
{
role: 'button',
name: 'My Button',
children: [{ role: 'text', name: 'My Button' }],
children: [{ role: 'StaticText', name: 'My Button' }],
},
],
});
Expand Down
6 changes: 3 additions & 3 deletions test/headful.spec.ts
Expand Up @@ -200,13 +200,14 @@ describeChromeOnly('headful tests', function () {
flatten: true,
waitForDebuggerOnStart: true,
});
session.connection().on('sessionattached', async (session) => {
session.on('sessionattached', async (session) => {
otherSessions.push(session);

session.on('Network.requestWillBeSent', (params) =>
networkEvents.push(params)
);
await session.send('Network.enable');
await session.send('Runtime.runIfWaitingForDebugger');
});

// Navigate to the empty page and add an OOPIF iframe with at least one request.
Expand All @@ -227,7 +228,6 @@ describeChromeOnly('headful tests', function () {

// Resume the iframe and trigger another request.
const iframeSession = otherSessions[0];
await iframeSession.send('Runtime.runIfWaitingForDebugger');
await iframeSession.send('Runtime.evaluate', {
expression: `fetch('/fetch')`,
awaitPromise: true,
Expand Down Expand Up @@ -258,7 +258,7 @@ describeChromeOnly('headful tests', function () {
const context = await browser.createIncognitoBrowserContext();
await Promise.all([
context.newPage(),
context.waitForTarget((target) => target.url().includes('devtools://')),
browser.waitForTarget((target) => target.url().includes('devtools://')),
]);
await browser.close();
});
Expand Down
1 change: 1 addition & 0 deletions versions.js
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.
['92.0.4512.0', 'v9.1.1'],
jschfflr marked this conversation as resolved.
Show resolved Hide resolved
['91.0.4469.0', 'v9.0.0'],
['90.0.4427.0', 'v8.0.0'],
['90.0.4403.0', 'v7.0.0'],
Expand Down