-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
deps: upgrade puppeteer to v21.3.6 #15490
Changes from all commits
c397604
cfc66e6
fac5c7b
bec7b61
6f5597f
4b5917e
da4b374
1bb6c01
30564e9
2548b11
ba1ee67
5950245
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -494,18 +494,6 @@ const expectations = { | |
}], | ||
}, | ||
}, | ||
{ | ||
// Support for this was added in M109 | ||
// https://crbug.com/1350944 | ||
_maxChromiumVersion: '108', | ||
reason: 'Pages that have requested notifications permissions are not currently eligible for back/forward cache.', | ||
failureType: 'Pending browser support', | ||
subItems: { | ||
items: [{ | ||
frameUrl: 'http://localhost:10200/dobetterweb/dbw_tester.html', | ||
}], | ||
}, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drive-by outdated bfcache failure |
||
{ | ||
// This issue only appears in the DevTools runner for some reason. | ||
// TODO: Investigate why this doesn't happen on the CLI runner. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ import {fileURLToPath} from 'url'; | |
import * as puppeteer from 'puppeteer-core'; | ||
import yargs from 'yargs'; | ||
import * as yargsHelpers from 'yargs/helpers'; | ||
import {getChromePath} from 'chrome-launcher'; | ||
import {launch} from 'chrome-launcher'; | ||
import esMain from 'es-main'; | ||
|
||
import {parseChromeFlags} from '../../cli/run.js'; | ||
|
@@ -300,12 +300,17 @@ function dismissDialog(dialog) { | |
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, logs: string[]}>} | ||
*/ | ||
async function testUrlFromDevtools(url, options = {}) { | ||
const {config, chromeFlags} = options; | ||
const {config, chromeFlags = []} = options; | ||
|
||
const browser = await puppeteer.launch({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Puppeteer will now disable the bfcache if we aren't using tab target which is currently only available through an environment variable This is an alternative approach which just uses |
||
executablePath: getChromePath(), | ||
args: chromeFlags, | ||
devtools: true, | ||
const newChromeFlags = [ | ||
...chromeFlags, | ||
'--auto-open-devtools-for-tabs', | ||
]; | ||
|
||
const chrome = await launch({chromeFlags: newChromeFlags}); | ||
|
||
const browser = await puppeteer.connect({ | ||
browserURL: `http://127.0.0.1:${chrome.port}`, | ||
defaultViewport: null, | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,7 @@ describe('Individual modes API', function() { | |
const run = await api.startTimespan(state.page); | ||
for (const iframe of page.frames()) { | ||
if (iframe.url().includes('/oopif-simple-page.html')) { | ||
iframe.click('button'); | ||
await iframe.click('button'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without this This is a fix for the issue mentioned in #15490 (comment) |
||
} | ||
} | ||
await page.waitForNetworkIdle().catch(() => {}); | ||
|
@@ -180,10 +180,6 @@ describe('Individual modes API', function() { | |
.map((r) => ({url: r.url, sessionTargetType: r.sessionTargetType})) | ||
// @ts-expect-error | ||
.sort((a, b) => a.url.localeCompare(b.url)); | ||
expect(networkRequests).toHaveLength(10); | ||
expect(networkRequests.filter(r => r.sessionTargetType === 'page')).toHaveLength(2); | ||
expect(networkRequests.filter(r => r.sessionTargetType === 'iframe')).toHaveLength(2); | ||
expect(networkRequests.filter(r => r.sessionTargetType === 'worker')).toHaveLength(6); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these checks are redundant with the snapshot check just below. The snapshot check provides better details on failure so we should just fall to that if a request is missing. |
||
expect(networkRequests).toMatchInlineSnapshot(` | ||
Array [ | ||
Object { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Page.js
has moved but it looks like the comment that containedfs.readFileSync
is not longer there so we should be good to remove.