diff --git a/core/gather/gatherers/inspector-issues.js b/core/gather/gatherers/inspector-issues.js index 9b7631f0aadf..8f4d949c979b 100644 --- a/core/gather/gatherers/inspector-issues.js +++ b/core/gather/gatherers/inspector-issues.js @@ -80,6 +80,7 @@ class InspectorIssues extends BaseGatherer { quirksModeIssue: [], cookieIssue: [], sharedArrayBufferIssue: [], + sharedDictionaryIssue: [], stylesheetLoadingIssue: [], federatedAuthUserInfoRequestIssue: [], }; diff --git a/core/scripts/pptr-run-devtools.js b/core/scripts/pptr-run-devtools.js index 64ad2a221472..7c0bc3bf6d70 100644 --- a/core/scripts/pptr-run-devtools.js +++ b/core/scripts/pptr-run-devtools.js @@ -161,7 +161,7 @@ async function waitForLighthouseReady() { const panel = LighthousePanel.LighthousePanel.instance(); - const button = panel.contentElement.querySelector('button'); + const button = panel.contentElement.querySelector('devtools-button,button'); if (button.disabled) throw new Error('Start button disabled'); const targetManager = TargetManager.TargetManager.instance(); @@ -213,7 +213,7 @@ async function runLighthouse() { // In CI clicking the start button just once is flaky and can cause a timeout. // Therefore, keep clicking the button until we detect that the run started. const intervalHandle = setInterval(() => { - const button = panel.contentElement.querySelector('button'); + const button = panel.contentElement.querySelector('devtools-button,button'); button.click(); }, 100); diff --git a/core/test/gather/gatherers/inspector-issues-test.js b/core/test/gather/gatherers/inspector-issues-test.js index eb69793df3d7..562363977dc6 100644 --- a/core/test/gather/gatherers/inspector-issues-test.js +++ b/core/test/gather/gatherers/inspector-issues-test.js @@ -250,6 +250,7 @@ describe('getArtifact', () => { propertyRuleIssue: [], quirksModeIssue: [], sharedArrayBufferIssue: [], + sharedDictionaryIssue: [], federatedAuthRequestIssue: [], stylesheetLoadingIssue: [], federatedAuthUserInfoRequestIssue: [], @@ -315,6 +316,7 @@ describe('getArtifact', () => { propertyRuleIssue: [], quirksModeIssue: [], sharedArrayBufferIssue: [], + sharedDictionaryIssue: [], federatedAuthRequestIssue: [], stylesheetLoadingIssue: [], federatedAuthUserInfoRequestIssue: [], diff --git a/docs/headless-chrome.md b/docs/headless-chrome.md index 96e4061b4042..20de67a71148 100644 --- a/docs/headless-chrome.md +++ b/docs/headless-chrome.md @@ -101,8 +101,10 @@ const chromeLauncher = require('chrome-launcher'); function launchChromeAndRunLighthouse(url, flags = {}, config = null) { return chromeLauncher.launch(flags).then(chrome => { flags.port = chrome.port; - return lighthouse(url, flags, config).then(results => - chrome.kill().then(() => results)); + return lighthouse(url, flags, config).then(results => { + chrome.kill(); + return results; + } }); } diff --git a/docs/puppeteer.md b/docs/puppeteer.md index dcb9de10cfa4..68c62e0d5256 100644 --- a/docs/puppeteer.md +++ b/docs/puppeteer.md @@ -73,5 +73,5 @@ const {lhr} = await lighthouse(url, undefined, undefined, page); console.log(`Lighthouse scores: ${Object.values(lhr.categories).map(c => c.score).join(', ')}`); await browser.disconnect(); -await chrome.kill(); +chrome.kill(); ``` diff --git a/docs/readme.md b/docs/readme.md index a2d8ad980a81..d7091b98a992 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -24,7 +24,7 @@ fs.writeFileSync('lhreport.html', reportHtml); console.log('Report is done for', runnerResult.lhr.finalDisplayedUrl); console.log('Performance score was', runnerResult.lhr.categories.performance.score * 100); -await chrome.kill(); +chrome.kill(); ``` ### Performance-only Lighthouse run diff --git a/package.json b/package.json index 154e9e06c55a..d3c92381af13 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "chrome-launcher": "^1.1.1", "configstore": "^5.0.1", "csp_evaluator": "1.1.1", - "devtools-protocol": "0.0.1232444", + "devtools-protocol": "0.0.1299070", "enquirer": "^2.3.6", "http-link-header": "^1.1.1", "intl-messageformat": "^10.5.3", @@ -210,8 +210,8 @@ "yargs-parser": "^21.0.0" }, "resolutions": { - "puppeteer/**/devtools-protocol": "0.0.1232444", - "puppeteer-core/**/devtools-protocol": "0.0.1232444" + "puppeteer/**/devtools-protocol": "0.0.1299070", + "puppeteer-core/**/devtools-protocol": "0.0.1299070" }, "repository": "GoogleChrome/lighthouse", "keywords": [ diff --git a/third-party/chromium-synchronization/inspector-issueAdded-types-test.js b/third-party/chromium-synchronization/inspector-issueAdded-types-test.js index 70f07fd0cb0b..be9934e4966c 100644 --- a/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +++ b/third-party/chromium-synchronization/inspector-issueAdded-types-test.js @@ -51,6 +51,7 @@ Array [ "propertyRuleIssueDetails", "quirksModeIssueDetails", "sharedArrayBufferIssueDetails", + "sharedDictionaryIssueDetails", "stylesheetLoadingIssueDetails", ] `); diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index fa1e6f13ab1b..9126d5928b8e 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -545,6 +545,7 @@ declare module Artifacts { quirksModeIssue: Crdp.Audits.QuirksModeIssueDetails[]; cookieIssue: Crdp.Audits.CookieIssueDetails[]; sharedArrayBufferIssue: Crdp.Audits.SharedArrayBufferIssueDetails[]; + sharedDictionaryIssue: Crdp.Audits.SharedDictionaryIssueDetails[]; stylesheetLoadingIssue: Crdp.Audits.StylesheetLoadingIssueDetails[]; federatedAuthUserInfoRequestIssue: Crdp.Audits.FederatedAuthUserInfoRequestIssueDetails[]; } diff --git a/yarn.lock b/yarn.lock index 47636d93851f..11eb4ccfc068 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2938,10 +2938,10 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -devtools-protocol@0.0.1232444, devtools-protocol@0.0.1262051: - version "0.0.1232444" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1232444.tgz#406345a90a871ba852c530d73482275234936eed" - integrity sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg== +devtools-protocol@0.0.1262051, devtools-protocol@0.0.1299070: + version "0.0.1299070" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz#b3e4cf0b678a46f0f907ae6e07e03ad3a53c00df" + integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg== diff-sequences@^28.0.2: version "28.0.2"