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

This commit is contained in:
Jan Scheffler 2021-05-26 18:44:29 +02:00 committed by GitHub
parent 2c9ff4feaf
commit f863f4bfe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 37 additions and 39 deletions

View File

@ -10,6 +10,7 @@
<!-- GEN:versions-per-release --> <!-- GEN:versions-per-release -->
- Releases per Chromium version: - 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 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.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) * Chromium 90.0.4403.0 - [Puppeteer v7.0.0](https://github.com/puppeteer/puppeteer/blob/v7.0.0/docs/api.md)

View File

@ -57,7 +57,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"debug": "4.3.1", "debug": "4.3.1",
"devtools-protocol": "0.0.869402", "devtools-protocol": "0.0.883894",
"extract-zip": "2.0.1", "extract-zip": "2.0.1",
"https-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.0",
"node-fetch": "2.6.1", "node-fetch": "2.6.1",

View File

@ -437,10 +437,11 @@ class AXNode {
properties.get(key) as boolean; properties.get(key) as boolean;
for (const booleanProperty of booleanProperties) { 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 // their frame has focus, not whether focus is specifically on the root
// node. // node.
if (booleanProperty === 'focused' && this._role === 'WebArea') continue; if (booleanProperty === 'focused' && this._role === 'RootWebArea')
continue;
const value = getBooleanPropertyValue(booleanProperty); const value = getBooleanPropertyValue(booleanProperty);
if (!value) continue; if (!value) continue;
node[booleanProperty] = getBooleanPropertyValue(booleanProperty); node[booleanProperty] = getBooleanPropertyValue(booleanProperty);

View File

@ -32,7 +32,7 @@ async function queryAXTree(
role, role,
}); });
const filteredNodes: Protocol.Accessibility.AXNode[] = nodes.filter( 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; return filteredNodes;
} }

View File

@ -126,12 +126,20 @@ export class Connection extends EventEmitter {
); );
this._sessions.set(sessionId, session); this._sessions.set(sessionId, session);
this.emit('sessionattached', session); this.emit('sessionattached', session);
const parentSession = this._sessions.get(object.sessionId);
if (parentSession) {
parentSession.emit('sessionattached', session);
}
} else if (object.method === 'Target.detachedFromTarget') { } else if (object.method === 'Target.detachedFromTarget') {
const session = this._sessions.get(object.params.sessionId); const session = this._sessions.get(object.params.sessionId);
if (session) { if (session) {
session._onClosed(); session._onClosed();
this._sessions.delete(object.params.sessionId); this._sessions.delete(object.params.sessionId);
this.emit('sessiondetached', session); this.emit('sessiondetached', session);
const parentSession = this._sessions.get(object.sessionId);
if (parentSession) {
parentSession.emit('sessiondetached', session);
}
} }
} }
if (object.sessionId) { if (object.sessionId) {

View File

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

View File

@ -103,4 +103,11 @@ describeChromeOnly('Target.createCDPSession', function () {
await client.send('ThisCommand.DoesNotExist'); 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();
});
}); });

View File

@ -87,10 +87,10 @@ describeFailsFirefox('Accessibility', function () {
], ],
} }
: { : {
role: 'WebArea', role: 'RootWebArea',
name: 'Accessibility Test', name: 'Accessibility Test',
children: [ children: [
{ role: 'text', name: 'Hello World' }, { role: 'StaticText', name: 'Hello World' },
{ role: 'heading', name: 'Inputs', level: 1 }, { role: 'heading', name: 'Inputs', level: 1 },
{ role: 'textbox', name: 'Empty input', focused: true }, { role: 'textbox', name: 'Empty input', focused: true },
{ role: 'textbox', name: 'readonly input', readonly: true }, { role: 'textbox', name: 'readonly input', readonly: true },
@ -148,7 +148,7 @@ describeFailsFirefox('Accessibility', function () {
name: '', name: '',
children: [ children: [
{ {
role: 'text', role: 'StaticText',
name: 'hi', name: 'hi',
}, },
], ],
@ -230,7 +230,7 @@ describeFailsFirefox('Accessibility', function () {
], ],
} }
: { : {
role: 'WebArea', role: 'RootWebArea',
name: '', name: '',
children: [ children: [
{ {
@ -263,7 +263,7 @@ describeFailsFirefox('Accessibility', function () {
name: 'Edit this image: ', name: 'Edit this image: ',
}, },
{ {
role: 'text', role: 'StaticText',
name: 'my fake image', name: 'my fake image',
}, },
], ],
@ -274,7 +274,7 @@ describeFailsFirefox('Accessibility', function () {
value: 'Edit this image: ', value: 'Edit this image: ',
children: [ children: [
{ {
role: 'text', role: 'StaticText',
name: 'Edit this image:', name: 'Edit this image:',
}, },
{ {
@ -300,7 +300,7 @@ describeFailsFirefox('Accessibility', function () {
value: 'Edit this image: my fake image', value: 'Edit this image: my fake image',
children: [ children: [
{ {
role: 'text', role: 'StaticText',
name: 'my fake image', name: 'my fake image',
}, },
], ],
@ -309,9 +309,10 @@ describeFailsFirefox('Accessibility', function () {
role: 'textbox', role: 'textbox',
name: '', name: '',
value: 'Edit this image: ', value: 'Edit this image: ',
multiline: true,
children: [ children: [
{ {
role: 'text', role: 'StaticText',
name: 'Edit this image:', name: 'Edit this image:',
}, },
{ {
@ -336,28 +337,7 @@ describeFailsFirefox('Accessibility', function () {
role: 'textbox', role: 'textbox',
name: '', name: '',
value: 'Edit this image:', value: 'Edit this image:',
}); multiline: true,
});
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: '',
}); });
}); });
}); });
@ -502,7 +482,7 @@ describeFailsFirefox('Accessibility', function () {
{ {
role: 'button', role: 'button',
name: 'My Button', name: 'My Button',
children: [{ role: 'text', name: 'My Button' }], children: [{ role: 'StaticText', name: 'My Button' }],
}, },
], ],
}); });

View File

@ -200,13 +200,14 @@ describeChromeOnly('headful tests', function () {
flatten: true, flatten: true,
waitForDebuggerOnStart: true, waitForDebuggerOnStart: true,
}); });
session.connection().on('sessionattached', async (session) => { session.on('sessionattached', async (session) => {
otherSessions.push(session); otherSessions.push(session);
session.on('Network.requestWillBeSent', (params) => session.on('Network.requestWillBeSent', (params) =>
networkEvents.push(params) networkEvents.push(params)
); );
await session.send('Network.enable'); 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. // Navigate to the empty page and add an OOPIF iframe with at least one request.
@ -227,7 +228,6 @@ describeChromeOnly('headful tests', function () {
// Resume the iframe and trigger another request. // Resume the iframe and trigger another request.
const iframeSession = otherSessions[0]; const iframeSession = otherSessions[0];
await iframeSession.send('Runtime.runIfWaitingForDebugger');
await iframeSession.send('Runtime.evaluate', { await iframeSession.send('Runtime.evaluate', {
expression: `fetch('/fetch')`, expression: `fetch('/fetch')`,
awaitPromise: true, awaitPromise: true,
@ -258,7 +258,7 @@ describeChromeOnly('headful tests', function () {
const context = await browser.createIncognitoBrowserContext(); const context = await browser.createIncognitoBrowserContext();
await Promise.all([ await Promise.all([
context.newPage(), context.newPage(),
context.waitForTarget((target) => target.url().includes('devtools://')), browser.waitForTarget((target) => target.url().includes('devtools://')),
]); ]);
await browser.close(); await browser.close();
}); });

View File

@ -17,6 +17,7 @@
const versionsPerRelease = new Map([ const versionsPerRelease = new Map([
// This is a mapping from Chromium version => Puppeteer version. // This is a mapping from Chromium version => Puppeteer version.
// In Chromium roll patches, use 'NEXT' for the Puppeteer version. // In Chromium roll patches, use 'NEXT' for the Puppeteer version.
['92.0.4512.0', 'v9.1.1'],
['91.0.4469.0', 'v9.0.0'], ['91.0.4469.0', 'v9.0.0'],
['90.0.4427.0', 'v8.0.0'], ['90.0.4427.0', 'v8.0.0'],
['90.0.4403.0', 'v7.0.0'], ['90.0.4403.0', 'v7.0.0'],