From 249e153e317e30f27e43e909dfb17d2cc6d6207c Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Tue, 31 Oct 2023 11:07:08 -0500 Subject: [PATCH 1/8] core(bf-cache): add warning and hide when using old headless --- core/audits/bf-cache.js | 12 +++++++++++- shared/localization/locales/en-US.json | 3 +++ shared/localization/locales/en-XL.json | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index 55eefe73c1fe..dbb0b8595791 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -26,6 +26,8 @@ const UIStrings = { failureReasonColumn: 'Failure reason', /** Label for a column in a data table; entries in the column will be a string representing the type of failure preventing the back/forward cache from being used. */ failureTypeColumn: 'Failure type', + /** Warning explaining that the back/forward cache results cannot be shown in the old Headless Chrome. "back/forward" refers to the back and forward buttons found in modern browsers. "Headless Chrome" is a product name and should not be translated. */ + warningHeadless: 'Back/forward cache cannot be tested in old Headless Chrome (`--headless=old`). To see audit results, use the new Headless Chrome (`--headless=new`) or standard Chrome.', /** * @description [ICU Syntax] Label for an audit identifying the number of back/forward cache failure reasons found in the page. */ @@ -60,7 +62,7 @@ class BFCache extends Audit { description: str_(UIStrings.description), supportedModes: ['navigation', 'timespan'], guidanceLevel: 2, - requiredArtifacts: ['BFCacheFailures'], + requiredArtifacts: ['BFCacheFailures', 'HostUserAgent'], scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS, }; } @@ -70,6 +72,14 @@ class BFCache extends Audit { * @return {Promise} */ static async audit(artifacts) { + if (artifacts.HostUserAgent.indexOf('HeadlessChrome') !== -1) { + return { + score: null, + notApplicable: true, + warnings: [str_(UIStrings.warningHeadless)], + }; + } + const failures = artifacts.BFCacheFailures; if (!failures.length) return {score: 1}; diff --git a/shared/localization/locales/en-US.json b/shared/localization/locales/en-US.json index 005a526db204..71b02dd3f9dd 100644 --- a/shared/localization/locales/en-US.json +++ b/shared/localization/locales/en-US.json @@ -605,6 +605,9 @@ "core/audits/bf-cache.js | title": { "message": "Page didn't prevent back/forward cache restoration" }, + "core/audits/bf-cache.js | warningHeadless": { + "message": "Back/forward cache cannot be tested in old Headless Chrome (`--headless=old`). To see audit results, use the new Headless Chrome (`--headless=new`) or standard Chrome." + }, "core/audits/bootup-time.js | chromeExtensionsWarning": { "message": "Chrome extensions negatively affected this page's load performance. Try auditing the page in incognito mode or from a Chrome profile without extensions." }, diff --git a/shared/localization/locales/en-XL.json b/shared/localization/locales/en-XL.json index 3f1cf397915f..79ffef9adf60 100644 --- a/shared/localization/locales/en-XL.json +++ b/shared/localization/locales/en-XL.json @@ -605,6 +605,9 @@ "core/audits/bf-cache.js | title": { "message": "P̂áĝé d̂íd̂ń't̂ ṕr̂év̂én̂t́ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé r̂éŝt́ôŕât́îón̂" }, + "core/audits/bf-cache.js | warningHeadless": { + "message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé ĉán̂ńôt́ b̂é t̂éŝt́êd́ îń ôĺd̂ H́êád̂ĺêśŝ Ćĥŕôḿê (`--headless=old`). T́ô śêé âúd̂ít̂ ŕêśûĺt̂ś, ûśê t́ĥé n̂éŵ H́êád̂ĺêśŝ Ćĥŕôḿê (`--headless=new`) ór̂ śt̂án̂d́âŕd̂ Ćĥŕôḿê." + }, "core/audits/bootup-time.js | chromeExtensionsWarning": { "message": "Ĉh́r̂óm̂é êx́t̂én̂śîón̂ś n̂éĝát̂ív̂él̂ý âf́f̂éĉt́êd́ t̂h́îś p̂áĝé'ŝ ĺôád̂ ṕêŕf̂ór̂ḿâńĉé. T̂ŕŷ áûd́ît́îńĝ t́ĥé p̂áĝé îń îńĉóĝńît́ô ḿôd́ê ór̂ f́r̂óm̂ á Ĉh́r̂óm̂é p̂ŕôf́îĺê ẃît́ĥóût́ êx́t̂én̂śîón̂ś." }, From 1191e9875b8f7080776f5d9f0671130d247bd536 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Tue, 31 Oct 2023 11:08:35 -0500 Subject: [PATCH 2/8] str --- core/audits/bf-cache.js | 2 +- shared/localization/locales/en-US.json | 2 +- shared/localization/locales/en-XL.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index dbb0b8595791..e434b15f39ae 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -27,7 +27,7 @@ const UIStrings = { /** Label for a column in a data table; entries in the column will be a string representing the type of failure preventing the back/forward cache from being used. */ failureTypeColumn: 'Failure type', /** Warning explaining that the back/forward cache results cannot be shown in the old Headless Chrome. "back/forward" refers to the back and forward buttons found in modern browsers. "Headless Chrome" is a product name and should not be translated. */ - warningHeadless: 'Back/forward cache cannot be tested in old Headless Chrome (`--headless=old`). To see audit results, use the new Headless Chrome (`--headless=new`) or standard Chrome.', + warningHeadless: 'Back/forward cache cannot be tested in old Headless Chrome (`--chrome-flags="--headless=old"`). To see audit results, use the new Headless Chrome (`--chrome-flags="--headless=new"`) or standard Chrome.', /** * @description [ICU Syntax] Label for an audit identifying the number of back/forward cache failure reasons found in the page. */ diff --git a/shared/localization/locales/en-US.json b/shared/localization/locales/en-US.json index 71b02dd3f9dd..83c892de98d9 100644 --- a/shared/localization/locales/en-US.json +++ b/shared/localization/locales/en-US.json @@ -606,7 +606,7 @@ "message": "Page didn't prevent back/forward cache restoration" }, "core/audits/bf-cache.js | warningHeadless": { - "message": "Back/forward cache cannot be tested in old Headless Chrome (`--headless=old`). To see audit results, use the new Headless Chrome (`--headless=new`) or standard Chrome." + "message": "Back/forward cache cannot be tested in old Headless Chrome (`--chrome-flags=\"--headless=old\"`). To see audit results, use the new Headless Chrome (`--chrome-flags=\"--headless=new\"`) or standard Chrome." }, "core/audits/bootup-time.js | chromeExtensionsWarning": { "message": "Chrome extensions negatively affected this page's load performance. Try auditing the page in incognito mode or from a Chrome profile without extensions." diff --git a/shared/localization/locales/en-XL.json b/shared/localization/locales/en-XL.json index 79ffef9adf60..7978b0661816 100644 --- a/shared/localization/locales/en-XL.json +++ b/shared/localization/locales/en-XL.json @@ -606,7 +606,7 @@ "message": "P̂áĝé d̂íd̂ń't̂ ṕr̂év̂én̂t́ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé r̂éŝt́ôŕât́îón̂" }, "core/audits/bf-cache.js | warningHeadless": { - "message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé ĉán̂ńôt́ b̂é t̂éŝt́êd́ îń ôĺd̂ H́êád̂ĺêśŝ Ćĥŕôḿê (`--headless=old`). T́ô śêé âúd̂ít̂ ŕêśûĺt̂ś, ûśê t́ĥé n̂éŵ H́êád̂ĺêśŝ Ćĥŕôḿê (`--headless=new`) ór̂ śt̂án̂d́âŕd̂ Ćĥŕôḿê." + "message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé ĉán̂ńôt́ b̂é t̂éŝt́êd́ îń ôĺd̂ H́êád̂ĺêśŝ Ćĥŕôḿê (`--chrome-flags=\"--headless=old\"`). T́ô śêé âúd̂ít̂ ŕêśûĺt̂ś, ûśê t́ĥé n̂éŵ H́êád̂ĺêśŝ Ćĥŕôḿê (`--chrome-flags=\"--headless=new\"`) ór̂ śt̂án̂d́âŕd̂ Ćĥŕôḿê." }, "core/audits/bootup-time.js | chromeExtensionsWarning": { "message": "Ĉh́r̂óm̂é êx́t̂én̂śîón̂ś n̂éĝát̂ív̂él̂ý âf́f̂éĉt́êd́ t̂h́îś p̂áĝé'ŝ ĺôád̂ ṕêŕf̂ór̂ḿâńĉé. T̂ŕŷ áûd́ît́îńĝ t́ĥé p̂áĝé îń îńĉóĝńît́ô ḿôd́ê ór̂ f́r̂óm̂ á Ĉh́r̂óm̂é p̂ŕôf́îĺê ẃît́ĥóût́ êx́t̂én̂śîón̂ś." From 4a0e76cb8487dbd8f7e559c6a4b51822cba2eaff Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Tue, 31 Oct 2023 11:59:14 -0500 Subject: [PATCH 3/8] fix condition --- core/audits/bf-cache.js | 6 +++++- core/test/audits/bf-cache-test.js | 36 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index e434b15f39ae..4c04b25f32d3 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -72,7 +72,11 @@ class BFCache extends Audit { * @return {Promise} */ static async audit(artifacts) { - if (artifacts.HostUserAgent.indexOf('HeadlessChrome') !== -1) { + // Old headless mode does not obfuscate the specific Chrome version in the UA string + // Old Headless Example: HeadlessChrome/120.0.6099.1 + // New Headless Example: HeadlessChrome/120.0.0.0 + const isOldHeadless = /HeadlessChrome\/[0-9]+\.0.[0-9]{2,}.0/.test(artifacts.HostUserAgent); + if (isOldHeadless) { return { score: null, notApplicable: true, diff --git a/core/test/audits/bf-cache-test.js b/core/test/audits/bf-cache-test.js index f4e1901c985e..6be7bb5aaa21 100644 --- a/core/test/audits/bf-cache-test.js +++ b/core/test/audits/bf-cache-test.js @@ -10,6 +10,8 @@ describe('BFCache audit', () => { it('fails if there are actionable failure reasons', async () => { /** @type {any} */ const artifacts = { + // eslint-disable-next-line max-len + HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: { @@ -62,6 +64,8 @@ describe('BFCache audit', () => { it('fails if there are only non-actionable failures', async () => { /** @type {any} */ const artifacts = { + // eslint-disable-next-line max-len + HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: {}, @@ -84,9 +88,41 @@ describe('BFCache audit', () => { expect(result.details.items).toHaveLength(2); }); + it('is n/a if using old headless', async () => { + /** @type {any} */ + const artifacts = { + // eslint-disable-next-line max-len + HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/109.0.5000.0 Mobile Safari/537.36', + BFCacheFailures: [{ + notRestoredReasonsTree: { + PageSupportNeeded: {}, + Circumstantial: { + BackForwardCacheDisabled: ['https://example.com'], + }, + SupportPending: { + CacheControlNoStore: ['https://frame.com'], + }, + }, + }], + }; + + const result = await BFCache.audit(artifacts); + + expect(result.displayValue).toBeUndefined(); + expect(result.score).toEqual(null); + expect(result.details).toBeUndefined(); + + expect(result.warnings).toHaveLength(1); + expect(result.warnings?.[0]).toBeDisplayString( + /Back\/forward cache cannot be tested in old Headless/ + ); + }); + it('passes if there are no failures', async () => { /** @type {any} */ const artifacts = { + // eslint-disable-next-line max-len + HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: {}, From 75e43b4e87401439aa707dd226ce7dc5459e234c Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Tue, 31 Oct 2023 12:03:27 -0500 Subject: [PATCH 4/8] fix --- core/audits/bf-cache.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index 4c04b25f32d3..28aefd60511c 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -75,7 +75,8 @@ class BFCache extends Audit { // Old headless mode does not obfuscate the specific Chrome version in the UA string // Old Headless Example: HeadlessChrome/120.0.6099.1 // New Headless Example: HeadlessChrome/120.0.0.0 - const isOldHeadless = /HeadlessChrome\/[0-9]+\.0.[0-9]{2,}.0/.test(artifacts.HostUserAgent); + const isOldHeadless = + /HeadlessChrome\/[0-9]+\.[0-9]+.[0-9]{2,}.[0-9]+/.test(artifacts.HostUserAgent); if (isOldHeadless) { return { score: null, From b0aeea4beec902b62eccb6b7b9d1de2f9a59ebcb Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Mon, 6 Nov 2023 13:41:53 -0600 Subject: [PATCH 5/8] product --- core/audits/bf-cache.js | 9 ++------- core/gather/base-artifacts.js | 3 ++- core/test/audits/bf-cache-test.js | 12 ++++-------- types/artifacts.d.ts | 2 ++ 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index 28aefd60511c..6a6144402f1d 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -62,7 +62,7 @@ class BFCache extends Audit { description: str_(UIStrings.description), supportedModes: ['navigation', 'timespan'], guidanceLevel: 2, - requiredArtifacts: ['BFCacheFailures', 'HostUserAgent'], + requiredArtifacts: ['BFCacheFailures', 'HostProduct'], scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS, }; } @@ -72,12 +72,7 @@ class BFCache extends Audit { * @return {Promise} */ static async audit(artifacts) { - // Old headless mode does not obfuscate the specific Chrome version in the UA string - // Old Headless Example: HeadlessChrome/120.0.6099.1 - // New Headless Example: HeadlessChrome/120.0.0.0 - const isOldHeadless = - /HeadlessChrome\/[0-9]+\.[0-9]+.[0-9]{2,}.[0-9]+/.test(artifacts.HostUserAgent); - if (isOldHeadless) { + if (/HeadlessChrome/.test(artifacts.HostProduct)) { return { score: null, notApplicable: true, diff --git a/core/gather/base-artifacts.js b/core/gather/base-artifacts.js index f9cb5469d244..5bb2a639cda4 100644 --- a/core/gather/base-artifacts.js +++ b/core/gather/base-artifacts.js @@ -19,7 +19,7 @@ import { */ async function getBaseArtifacts(resolvedConfig, driver, context) { const BenchmarkIndex = await getBenchmarkIndex(driver.executionContext); - const {userAgent} = await getBrowserVersion(driver.defaultSession); + const {userAgent, product} = await getBrowserVersion(driver.defaultSession); return { // Meta artifacts. @@ -32,6 +32,7 @@ async function getBaseArtifacts(resolvedConfig, driver, context) { HostUserAgent: userAgent, HostFormFactor: userAgent.includes('Android') || userAgent.includes('Mobile') ? 'mobile' : 'desktop', + HostProduct: product, // Contextual artifacts whose collection changes based on gather mode. URL: { finalDisplayedUrl: '', diff --git a/core/test/audits/bf-cache-test.js b/core/test/audits/bf-cache-test.js index 6be7bb5aaa21..22cf00ccb65a 100644 --- a/core/test/audits/bf-cache-test.js +++ b/core/test/audits/bf-cache-test.js @@ -10,8 +10,7 @@ describe('BFCache audit', () => { it('fails if there are actionable failure reasons', async () => { /** @type {any} */ const artifacts = { - // eslint-disable-next-line max-len - HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', + HostProduct: 'Chrome/109.0.5000.0', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: { @@ -64,8 +63,7 @@ describe('BFCache audit', () => { it('fails if there are only non-actionable failures', async () => { /** @type {any} */ const artifacts = { - // eslint-disable-next-line max-len - HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', + HostProduct: 'Chrome/109.0.5000.0', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: {}, @@ -91,8 +89,7 @@ describe('BFCache audit', () => { it('is n/a if using old headless', async () => { /** @type {any} */ const artifacts = { - // eslint-disable-next-line max-len - HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/109.0.5000.0 Mobile Safari/537.36', + HostProduct: 'HeadlessChrome/109.0.5000.0', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: {}, @@ -121,8 +118,7 @@ describe('BFCache audit', () => { it('passes if there are no failures', async () => { /** @type {any} */ const artifacts = { - // eslint-disable-next-line max-len - HostUserAgent: 'Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36', + HostProduct: 'Chrome/109.0.5000.0', BFCacheFailures: [{ notRestoredReasonsTree: { PageSupportNeeded: {}, diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index 55749e92a3a0..b1ab1c1aea45 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -53,6 +53,8 @@ interface UniversalBaseArtifacts { HostFormFactor: 'desktop'|'mobile'; /** The user agent string of the version of Chrome used. */ HostUserAgent: string; + /** The product string of the version of Chrome used. */ + HostProduct: string; /** Information about how Lighthouse artifacts were gathered. */ GatherContext: {gatherMode: Gatherer.GatherMode}; } From 2181fd4fd10d2f770d0600c91ddae39a556de716 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Mon, 6 Nov 2023 13:44:46 -0600 Subject: [PATCH 6/8] fix --- core/config/filters.js | 1 + core/test/gather/mock-driver.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/config/filters.js b/core/config/filters.js index 3ed9c41eb1ef..054392a4feb9 100644 --- a/core/config/filters.js +++ b/core/config/filters.js @@ -20,6 +20,7 @@ const baseArtifactKeySource = { PageLoadError: '', HostFormFactor: '', HostUserAgent: '', + HostProduct: '', GatherContext: '', }; diff --git a/core/test/gather/mock-driver.js b/core/test/gather/mock-driver.js index 2f0f8e8b9637..4e3618cb2aa6 100644 --- a/core/test/gather/mock-driver.js +++ b/core/test/gather/mock-driver.js @@ -224,7 +224,8 @@ function createMockBaseArtifacts() { LighthouseRunWarnings: [], Timing: [], HostFormFactor: 'desktop', - HostUserAgent: 'Chrome/93.0.1449.0', + HostUserAgent: 'Chrome/93.0.0.0', + HostProduct: 'Chrome/93.0.1449.0', GatherContext: {gatherMode: 'navigation'}, }; } From efc0a980909527ba92303a30579a648b17ab71ec Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Mon, 6 Nov 2023 13:54:02 -0600 Subject: [PATCH 7/8] artifacts --- .../fixtures/user-flows/artifacts/step0/artifacts.json | 10 ++++++++-- .../fixtures/user-flows/artifacts/step1/artifacts.json | 10 ++++++++-- .../fixtures/user-flows/artifacts/step2/artifacts.json | 10 ++++++++-- .../fixtures/user-flows/artifacts/step3/artifacts.json | 10 ++++++++-- core/test/results/artifacts/artifacts.json | 10 ++++++++-- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/core/test/fixtures/user-flows/artifacts/step0/artifacts.json b/core/test/fixtures/user-flows/artifacts/step0/artifacts.json index e04ed9a4509c..5060bde0a3c2 100644 --- a/core/test/fixtures/user-flows/artifacts/step0/artifacts.json +++ b/core/test/fixtures/user-flows/artifacts/step0/artifacts.json @@ -495,7 +495,12 @@ "emulatedUserAgent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", "auditMode": false, "gatherMode": false, - "clearStorageTypes": ["file_systems", "shader_cache", "service_workers", "cache_storage"], + "clearStorageTypes": [ + "file_systems", + "shader_cache", + "service_workers", + "cache_storage" + ], "disableStorageReset": false, "debugNavigation": false, "channel": "node", @@ -20698,5 +20703,6 @@ } ], "labels": [] - } + }, + "HostProduct": "Chrome/121.0.6110.0" } diff --git a/core/test/fixtures/user-flows/artifacts/step1/artifacts.json b/core/test/fixtures/user-flows/artifacts/step1/artifacts.json index 4db0678be4c7..2dcf31ee593a 100644 --- a/core/test/fixtures/user-flows/artifacts/step1/artifacts.json +++ b/core/test/fixtures/user-flows/artifacts/step1/artifacts.json @@ -287,7 +287,12 @@ "emulatedUserAgent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", "auditMode": false, "gatherMode": false, - "clearStorageTypes": ["file_systems", "shader_cache", "service_workers", "cache_storage"], + "clearStorageTypes": [ + "file_systems", + "shader_cache", + "service_workers", + "cache_storage" + ], "disableStorageReset": false, "debugNavigation": false, "channel": "node", @@ -10923,5 +10928,6 @@ } } }, - "BFCacheFailures": [] + "BFCacheFailures": [], + "HostProduct": "Chrome/121.0.6110.0" } diff --git a/core/test/fixtures/user-flows/artifacts/step2/artifacts.json b/core/test/fixtures/user-flows/artifacts/step2/artifacts.json index 194bbe512676..15185da021b5 100644 --- a/core/test/fixtures/user-flows/artifacts/step2/artifacts.json +++ b/core/test/fixtures/user-flows/artifacts/step2/artifacts.json @@ -207,7 +207,12 @@ "emulatedUserAgent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", "auditMode": false, "gatherMode": false, - "clearStorageTypes": ["file_systems", "shader_cache", "service_workers", "cache_storage"], + "clearStorageTypes": [ + "file_systems", + "shader_cache", + "service_workers", + "cache_storage" + ], "disableStorageReset": false, "debugNavigation": false, "channel": "node", @@ -5716,5 +5721,6 @@ } ], "labels": [] - } + }, + "HostProduct": "Chrome/121.0.6110.0" } diff --git a/core/test/fixtures/user-flows/artifacts/step3/artifacts.json b/core/test/fixtures/user-flows/artifacts/step3/artifacts.json index 31a186f7ba2a..83e853243245 100644 --- a/core/test/fixtures/user-flows/artifacts/step3/artifacts.json +++ b/core/test/fixtures/user-flows/artifacts/step3/artifacts.json @@ -479,7 +479,12 @@ "emulatedUserAgent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", "auditMode": false, "gatherMode": false, - "clearStorageTypes": ["file_systems", "shader_cache", "service_workers", "cache_storage"], + "clearStorageTypes": [ + "file_systems", + "shader_cache", + "service_workers", + "cache_storage" + ], "disableStorageReset": true, "debugNavigation": false, "channel": "node", @@ -20622,5 +20627,6 @@ } } ] - } + }, + "HostProduct": "Chrome/121.0.6110.0" } diff --git a/core/test/results/artifacts/artifacts.json b/core/test/results/artifacts/artifacts.json index fd6277ab1b8c..a1ac94123416 100644 --- a/core/test/results/artifacts/artifacts.json +++ b/core/test/results/artifacts/artifacts.json @@ -64,7 +64,12 @@ "emulatedUserAgent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36", "auditMode": false, "gatherMode": "core/test/results/artifacts", - "clearStorageTypes": ["file_systems", "shader_cache", "service_workers", "cache_storage"], + "clearStorageTypes": [ + "file_systems", + "shader_cache", + "service_workers", + "cache_storage" + ], "disableStorageReset": false, "debugNavigation": false, "channel": "cli", @@ -13195,5 +13200,6 @@ "SupportPending": {} } } - ] + ], + "HostProduct": "Chrome/121.0.6110.0" } From 20bf3d36cb0bf33beeaae1c54d27558f9bdf00e4 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 7 Dec 2023 11:01:05 -0800 Subject: [PATCH 8/8] comment --- types/artifacts.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index b1ab1c1aea45..bb5c79942214 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -53,7 +53,7 @@ interface UniversalBaseArtifacts { HostFormFactor: 'desktop'|'mobile'; /** The user agent string of the version of Chrome used. */ HostUserAgent: string; - /** The product string of the version of Chrome used. */ + /** The product string of the version of Chrome used. Example: HeadlessChrome/123.2.2.0 would be from old headless. */ HostProduct: string; /** Information about how Lighthouse artifacts were gathered. */ GatherContext: {gatherMode: Gatherer.GatherMode};