lighthouse 12.8.2 → 13.0.0-dev.20251009

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/cli/cli-flags.js +1 -1
  2. package/cli/test/smokehouse/config/exclusions.js +0 -2
  3. package/cli/test/smokehouse/version-check.d.ts +1 -1
  4. package/core/audits/accessibility/accesskeys.js +3 -3
  5. package/core/audits/accessibility/aria-allowed-attr.js +3 -3
  6. package/core/audits/accessibility/aria-allowed-role.js +2 -1
  7. package/core/audits/accessibility/aria-command-name.js +1 -1
  8. package/core/audits/accessibility/aria-conditional-attr.js +1 -1
  9. package/core/audits/accessibility/aria-deprecated-role.js +1 -1
  10. package/core/audits/accessibility/aria-dialog-name.js +1 -1
  11. package/core/audits/accessibility/aria-hidden-body.js +3 -3
  12. package/core/audits/accessibility/aria-hidden-focus.js +3 -3
  13. package/core/audits/accessibility/aria-input-field-name.js +3 -3
  14. package/core/audits/accessibility/aria-meter-name.js +1 -1
  15. package/core/audits/accessibility/aria-progressbar-name.js +1 -1
  16. package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
  17. package/core/audits/accessibility/aria-required-attr.js +3 -3
  18. package/core/audits/accessibility/aria-required-children.js +3 -3
  19. package/core/audits/accessibility/aria-required-parent.js +3 -3
  20. package/core/audits/accessibility/aria-roles.js +3 -3
  21. package/core/audits/accessibility/aria-text.js +3 -3
  22. package/core/audits/accessibility/aria-toggle-field-name.js +3 -3
  23. package/core/audits/accessibility/aria-tooltip-name.js +1 -1
  24. package/core/audits/accessibility/aria-treeitem-name.js +1 -1
  25. package/core/audits/accessibility/aria-valid-attr-value.js +3 -3
  26. package/core/audits/accessibility/aria-valid-attr.js +3 -3
  27. package/core/audits/accessibility/button-name.js +3 -3
  28. package/core/audits/accessibility/bypass.js +3 -3
  29. package/core/audits/accessibility/color-contrast.js +3 -3
  30. package/core/audits/accessibility/definition-list.js +3 -3
  31. package/core/audits/accessibility/dlitem.js +3 -3
  32. package/core/audits/accessibility/document-title.js +3 -3
  33. package/core/audits/accessibility/duplicate-id-aria.js +3 -3
  34. package/core/audits/accessibility/empty-heading.js +3 -3
  35. package/core/audits/accessibility/form-field-multiple-labels.js +3 -3
  36. package/core/audits/accessibility/frame-title.js +3 -3
  37. package/core/audits/accessibility/heading-order.js +3 -3
  38. package/core/audits/accessibility/html-has-lang.js +3 -3
  39. package/core/audits/accessibility/html-lang-valid.js +3 -3
  40. package/core/audits/accessibility/html-xml-lang-mismatch.js +3 -3
  41. package/core/audits/accessibility/identical-links-same-purpose.js +3 -3
  42. package/core/audits/accessibility/image-alt.js +3 -3
  43. package/core/audits/accessibility/image-redundant-alt.js +4 -3
  44. package/core/audits/accessibility/input-button-name.js +3 -3
  45. package/core/audits/accessibility/input-image-alt.js +3 -3
  46. package/core/audits/accessibility/label-content-name-mismatch.js +3 -3
  47. package/core/audits/accessibility/label.js +3 -3
  48. package/core/audits/accessibility/landmark-one-main.js +3 -4
  49. package/core/audits/accessibility/link-in-text-block.js +3 -3
  50. package/core/audits/accessibility/link-name.js +3 -3
  51. package/core/audits/accessibility/list.js +3 -3
  52. package/core/audits/accessibility/listitem.js +3 -3
  53. package/core/audits/accessibility/meta-refresh.js +3 -3
  54. package/core/audits/accessibility/meta-viewport.js +3 -3
  55. package/core/audits/accessibility/object-alt.js +3 -3
  56. package/core/audits/accessibility/select-name.js +3 -3
  57. package/core/audits/accessibility/skip-link.js +3 -3
  58. package/core/audits/accessibility/tabindex.js +3 -3
  59. package/core/audits/accessibility/table-duplicate-name.js +4 -3
  60. package/core/audits/accessibility/table-fake-caption.js +3 -3
  61. package/core/audits/accessibility/target-size.js +3 -3
  62. package/core/audits/accessibility/td-has-header.js +3 -3
  63. package/core/audits/accessibility/td-headers-attr.js +3 -3
  64. package/core/audits/accessibility/th-has-data-cells.js +3 -3
  65. package/core/audits/accessibility/valid-lang.js +3 -3
  66. package/core/audits/accessibility/video-caption.js +3 -3
  67. package/core/audits/audit.d.ts +0 -4
  68. package/core/audits/audit.js +2 -13
  69. package/core/audits/insights/cls-culprits-insight.js +1 -1
  70. package/core/audits/insights/dom-size-insight.js +11 -7
  71. package/core/audits/insights/font-display-insight.js +3 -1
  72. package/core/audits/insights/image-delivery-insight.js +4 -1
  73. package/core/audits/insights/insight-audit.d.ts +6 -4
  74. package/core/audits/insights/insight-audit.js +27 -8
  75. package/core/audits/insights/third-parties-insight.js +1 -1
  76. package/core/audits/layout-shifts.js +1 -1
  77. package/core/audits/predictive-perf.js +2 -2
  78. package/core/audits/seo/crawlable-anchors.js +2 -3
  79. package/core/audits/seo/manual/structured-data.js +1 -1
  80. package/core/audits/server-response-time.d.ts +0 -5
  81. package/core/audits/server-response-time.js +12 -26
  82. package/core/computed/metrics/cumulative-layout-shift.js +2 -2
  83. package/core/computed/metrics/lantern-metric.js +3 -3
  84. package/core/computed/metrics/lcp-breakdown.d.ts +10 -5
  85. package/core/computed/metrics/lcp-breakdown.js +50 -22
  86. package/core/computed/metrics/time-to-first-byte.js +33 -10
  87. package/core/computed/metrics/timing-summary.js +3 -2
  88. package/core/computed/page-dependency-graph.js +1 -1
  89. package/core/computed/trace-engine-result.js +2 -2
  90. package/core/config/default-config.js +110 -152
  91. package/core/config/experimental-config.js +1 -32
  92. package/core/config/filters.js +6 -9
  93. package/core/config/lr-desktop-config.js +0 -1
  94. package/core/config/lr-mobile-config.js +0 -1
  95. package/core/gather/driver/target-manager.d.ts +1 -1
  96. package/core/gather/driver.d.ts +1 -1
  97. package/core/gather/gatherers/anchor-elements.js +8 -24
  98. package/core/gather/gatherers/image-elements.js +32 -6
  99. package/core/gather/gatherers/inspector-issues.js +1 -28
  100. package/core/gather/gatherers/trace-elements.d.ts +2 -11
  101. package/core/gather/gatherers/trace-elements.js +9 -39
  102. package/core/gather/navigation-runner.js +0 -3
  103. package/core/gather/session.d.ts +1 -1
  104. package/core/lib/asset-saver.d.ts +2 -2
  105. package/core/lib/asset-saver.js +33 -43
  106. package/core/lib/bf-cache-strings.js +10 -9
  107. package/core/lib/deprecations-strings.js +5 -5
  108. package/core/lib/emulation.d.ts +10 -0
  109. package/core/lib/emulation.js +21 -6
  110. package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
  111. package/core/lib/network-request.d.ts +0 -7
  112. package/core/lib/network-request.js +0 -16
  113. package/core/lib/proto-preprocessor.js +10 -25
  114. package/core/runner.js +1 -8
  115. package/core/scoring.js +1 -1
  116. package/dist/report/bundle.esm.js +10 -49
  117. package/dist/report/flow.js +12 -51
  118. package/dist/report/standalone.js +11 -50
  119. package/flow-report/src/i18n/i18n.d.ts +4 -6
  120. package/package.json +16 -19
  121. package/readme.md +2 -2
  122. package/report/assets/styles.css +0 -39
  123. package/report/renderer/api.js +0 -1
  124. package/report/renderer/category-renderer.js +6 -0
  125. package/report/renderer/components.js +1 -1
  126. package/report/renderer/details-renderer.d.ts +1 -2
  127. package/report/renderer/details-renderer.js +0 -1
  128. package/report/renderer/dom.d.ts +0 -13
  129. package/report/renderer/dom.js +0 -38
  130. package/report/renderer/performance-category-renderer.d.ts +0 -26
  131. package/report/renderer/performance-category-renderer.js +10 -142
  132. package/report/renderer/report-ui-features.d.ts +0 -1
  133. package/report/renderer/report-ui-features.js +2 -13
  134. package/report/renderer/report-utils.d.ts +2 -3
  135. package/report/renderer/report-utils.js +4 -6
  136. package/report/types/report-renderer.d.ts +0 -6
  137. package/shared/localization/locales/ar-XB.json +107 -455
  138. package/shared/localization/locales/ar.json +107 -455
  139. package/shared/localization/locales/bg.json +96 -444
  140. package/shared/localization/locales/ca.json +96 -444
  141. package/shared/localization/locales/cs.json +96 -444
  142. package/shared/localization/locales/da.json +96 -444
  143. package/shared/localization/locales/de.json +96 -444
  144. package/shared/localization/locales/el.json +96 -444
  145. package/shared/localization/locales/en-GB.json +96 -444
  146. package/shared/localization/locales/en-US.json +116 -467
  147. package/shared/localization/locales/en-XA.json +93 -441
  148. package/shared/localization/locales/en-XL.json +116 -467
  149. package/shared/localization/locales/es-419.json +96 -444
  150. package/shared/localization/locales/es.json +96 -444
  151. package/shared/localization/locales/fi.json +96 -444
  152. package/shared/localization/locales/fil.json +96 -444
  153. package/shared/localization/locales/fr.json +96 -444
  154. package/shared/localization/locales/he.json +118 -466
  155. package/shared/localization/locales/hi.json +96 -444
  156. package/shared/localization/locales/hr.json +100 -448
  157. package/shared/localization/locales/hu.json +96 -444
  158. package/shared/localization/locales/id.json +96 -444
  159. package/shared/localization/locales/it.json +96 -444
  160. package/shared/localization/locales/ja.json +96 -444
  161. package/shared/localization/locales/ko.json +97 -445
  162. package/shared/localization/locales/lt.json +96 -444
  163. package/shared/localization/locales/lv.json +97 -445
  164. package/shared/localization/locales/nl.json +96 -444
  165. package/shared/localization/locales/no.json +96 -444
  166. package/shared/localization/locales/pl.json +96 -444
  167. package/shared/localization/locales/pt-PT.json +96 -444
  168. package/shared/localization/locales/pt.json +97 -445
  169. package/shared/localization/locales/ro.json +97 -445
  170. package/shared/localization/locales/ru.json +96 -444
  171. package/shared/localization/locales/sk.json +96 -444
  172. package/shared/localization/locales/sl.json +96 -444
  173. package/shared/localization/locales/sr-Latn.json +96 -444
  174. package/shared/localization/locales/sr.json +96 -444
  175. package/shared/localization/locales/sv.json +96 -444
  176. package/shared/localization/locales/ta.json +96 -444
  177. package/shared/localization/locales/te.json +97 -445
  178. package/shared/localization/locales/th.json +96 -444
  179. package/shared/localization/locales/tr.json +96 -444
  180. package/shared/localization/locales/uk.json +96 -444
  181. package/shared/localization/locales/vi.json +96 -444
  182. package/shared/localization/locales/zh-HK.json +96 -444
  183. package/shared/localization/locales/zh-TW.json +97 -445
  184. package/shared/localization/locales/zh.json +96 -444
  185. package/shared/localization/locales.d.ts +2 -0
  186. package/shared/localization/locales.js +130 -139
  187. package/shared/tsconfig.json +2 -0
  188. package/tsconfig-base.json +2 -2
  189. package/tsconfig.json +1 -4
  190. package/types/artifacts.d.ts +6 -81
  191. package/types/audit.d.ts +1 -1
  192. package/types/lhr/settings.d.ts +1 -1
  193. package/core/audits/byte-efficiency/duplicated-javascript.d.ts +0 -45
  194. package/core/audits/byte-efficiency/duplicated-javascript.js +0 -223
  195. package/core/audits/byte-efficiency/efficient-animated-content.d.ts +0 -22
  196. package/core/audits/byte-efficiency/efficient-animated-content.js +0 -93
  197. package/core/audits/byte-efficiency/legacy-javascript.d.ts +0 -28
  198. package/core/audits/byte-efficiency/legacy-javascript.js +0 -144
  199. package/core/audits/byte-efficiency/modern-image-formats.d.ts +0 -38
  200. package/core/audits/byte-efficiency/modern-image-formats.js +0 -187
  201. package/core/audits/byte-efficiency/offscreen-images.d.ts +0 -63
  202. package/core/audits/byte-efficiency/offscreen-images.js +0 -240
  203. package/core/audits/byte-efficiency/render-blocking-resources.d.ts +0 -53
  204. package/core/audits/byte-efficiency/render-blocking-resources.js +0 -312
  205. package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +0 -59
  206. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +0 -293
  207. package/core/audits/byte-efficiency/uses-optimized-images.d.ts +0 -33
  208. package/core/audits/byte-efficiency/uses-optimized-images.js +0 -146
  209. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +0 -16
  210. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +0 -106
  211. package/core/audits/byte-efficiency/uses-responsive-images.d.ts +0 -44
  212. package/core/audits/byte-efficiency/uses-responsive-images.js +0 -202
  213. package/core/audits/byte-efficiency/uses-text-compression.d.ts +0 -14
  214. package/core/audits/byte-efficiency/uses-text-compression.js +0 -108
  215. package/core/audits/critical-request-chains.d.ts +0 -44
  216. package/core/audits/critical-request-chains.js +0 -221
  217. package/core/audits/dobetterweb/dom-size.d.ts +0 -32
  218. package/core/audits/dobetterweb/dom-size.js +0 -182
  219. package/core/audits/dobetterweb/no-document-write.d.ts +0 -16
  220. package/core/audits/dobetterweb/no-document-write.js +0 -86
  221. package/core/audits/dobetterweb/uses-http2.d.ts +0 -72
  222. package/core/audits/dobetterweb/uses-http2.js +0 -276
  223. package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +0 -16
  224. package/core/audits/dobetterweb/uses-passive-event-listeners.js +0 -69
  225. package/core/audits/font-display.d.ts +0 -32
  226. package/core/audits/font-display.js +0 -195
  227. package/core/audits/largest-contentful-paint-element.d.ts +0 -34
  228. package/core/audits/largest-contentful-paint-element.js +0 -181
  229. package/core/audits/lcp-lazy-loaded.d.ts +0 -22
  230. package/core/audits/lcp-lazy-loaded.js +0 -115
  231. package/core/audits/metrics/first-meaningful-paint.d.ts +0 -12
  232. package/core/audits/metrics/first-meaningful-paint.js +0 -47
  233. package/core/audits/preload-fonts.d.ts +0 -25
  234. package/core/audits/preload-fonts.js +0 -97
  235. package/core/audits/prioritize-lcp-image.d.ts +0 -74
  236. package/core/audits/prioritize-lcp-image.js +0 -297
  237. package/core/audits/seo/font-size.d.ts +0 -24
  238. package/core/audits/seo/font-size.js +0 -344
  239. package/core/audits/third-party-facades.d.ts +0 -41
  240. package/core/audits/third-party-facades.js +0 -234
  241. package/core/audits/third-party-summary.d.ts +0 -78
  242. package/core/audits/third-party-summary.js +0 -236
  243. package/core/audits/uses-rel-preconnect.d.ts +0 -37
  244. package/core/audits/uses-rel-preconnect.js +0 -286
  245. package/core/audits/uses-rel-preload.d.ts +0 -57
  246. package/core/audits/uses-rel-preload.js +0 -263
  247. package/core/audits/viewport.d.ts +0 -17
  248. package/core/audits/viewport.js +0 -87
  249. package/core/audits/work-during-interaction.d.ts +0 -81
  250. package/core/audits/work-during-interaction.js +0 -287
  251. package/core/computed/critical-request-chains.d.ts +0 -42
  252. package/core/computed/critical-request-chains.js +0 -143
  253. package/core/computed/viewport-meta.d.ts +0 -37
  254. package/core/computed/viewport-meta.js +0 -71
  255. package/core/gather/gatherers/cache-contents.d.ts +0 -11
  256. package/core/gather/gatherers/cache-contents.js +0 -56
  257. package/core/gather/gatherers/devtools-log-compat.d.ts +0 -13
  258. package/core/gather/gatherers/devtools-log-compat.js +0 -35
  259. package/core/gather/gatherers/dobetterweb/domstats.d.ts +0 -10
  260. package/core/gather/gatherers/dobetterweb/domstats.js +0 -102
  261. package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +0 -48
  262. package/core/gather/gatherers/dobetterweb/optimized-images.js +0 -169
  263. package/core/gather/gatherers/dobetterweb/response-compression.d.ts +0 -23
  264. package/core/gather/gatherers/dobetterweb/response-compression.js +0 -136
  265. package/core/gather/gatherers/seo/font-size.d.ts +0 -131
  266. package/core/gather/gatherers/seo/font-size.js +0 -347
  267. package/core/gather/gatherers/trace-compat.d.ts +0 -13
  268. package/core/gather/gatherers/trace-compat.js +0 -35
  269. package/types/internal/metaviewport-parser.d.ts +0 -13
  270. package/types/internal/parse-cache-control.d.ts +0 -20
@@ -14,44 +14,13 @@ const config = {
14
14
  extends: 'lighthouse:default',
15
15
  audits: [
16
16
  'autocomplete',
17
- // Preload advice is on hold until https://github.com/GoogleChrome/lighthouse/issues/11960
18
- 'preload-fonts',
19
- 'uses-rel-preload',
20
17
  ],
21
18
  categories: {
22
- // @ts-ignore: `title` is required in CategoryJson. setting to the same value as the default
23
- // config is awkward - easier to omit the property here. Will defer to default config.
24
- 'performance': {
25
- auditRefs: [
26
- {id: 'uses-rel-preload', weight: 0, group: 'diagnostics'},
27
-
28
- // TODO: Remove this when insights aren't hidden by default
29
- // Insight audits.
30
- {id: 'cache-insight', weight: 0, group: 'insights'},
31
- {id: 'cls-culprits-insight', weight: 0, group: 'insights'},
32
- {id: 'document-latency-insight', weight: 0, group: 'insights'},
33
- {id: 'dom-size-insight', weight: 0, group: 'insights'},
34
- {id: 'duplicated-javascript-insight', weight: 0, group: 'insights'},
35
- {id: 'font-display-insight', weight: 0, group: 'insights'},
36
- {id: 'forced-reflow-insight', weight: 0, group: 'insights'},
37
- {id: 'image-delivery-insight', weight: 0, group: 'insights'},
38
- {id: 'inp-breakdown-insight', weight: 0, group: 'insights'},
39
- {id: 'lcp-breakdown-insight', weight: 0, group: 'insights'},
40
- {id: 'lcp-discovery-insight', weight: 0, group: 'insights'},
41
- {id: 'legacy-javascript-insight', weight: 0, group: 'insights'},
42
- {id: 'modern-http-insight', weight: 0, group: 'insights'},
43
- {id: 'network-dependency-tree-insight', weight: 0, group: 'insights'},
44
- {id: 'render-blocking-insight', weight: 0, group: 'insights'},
45
- {id: 'third-parties-insight', weight: 0, group: 'insights'},
46
- {id: 'viewport-insight', weight: 0, group: 'insights'},
47
- ],
48
- },
49
- // @ts-ignore: `title` is required in CategoryJson. setting to the same value as the default
19
+ // @ts-expect-error: `title` is required in CategoryJson. setting to the same value as the default
50
20
  // config is awkward - easier to omit the property here. Will defer to default config.
51
21
  'best-practices': {
52
22
  auditRefs: [
53
23
  {id: 'autocomplete', weight: 0, group: 'best-practices-ux'},
54
- {id: 'preload-fonts', weight: 0, group: 'best-practices-ux'},
55
24
  ],
56
25
  },
57
26
  },
@@ -4,8 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- import log from 'lighthouse-logger';
8
-
9
7
  import {Audit} from '../audits/audit.js';
10
8
 
11
9
  /** @type {Record<keyof LH.BaseArtifacts, string>} */
@@ -176,20 +174,19 @@ function filterCategoriesByExplicitFilters(categories, onlyCategories) {
176
174
  }
177
175
 
178
176
  /**
179
- * Logs a warning if any specified onlyCategory is not a known category that can
177
+ * Throw an error if any specified onlyCategory is not a known category that can
180
178
  * be included.
181
179
  *
182
180
  * @param {LH.Config.ResolvedConfig['categories']} allCategories
183
181
  * @param {string[] | null} onlyCategories
184
182
  * @return {void}
185
183
  */
186
- function warnOnUnknownOnlyCategories(allCategories, onlyCategories) {
184
+ function errorOnUnknownOnlyCategories(allCategories, onlyCategories) {
187
185
  if (!onlyCategories) return;
188
186
 
189
- for (const onlyCategoryId of onlyCategories) {
190
- if (!allCategories?.[onlyCategoryId]) {
191
- log.warn('config', `unrecognized category in 'onlyCategories': ${onlyCategoryId}`);
192
- }
187
+ const unknown = onlyCategories.filter(c => !allCategories?.[c]);
188
+ if (unknown.length) {
189
+ throw new Error(`unrecognized category in 'onlyCategories': ${unknown.join(', ')}`);
193
190
  }
194
191
  }
195
192
 
@@ -271,7 +268,7 @@ function filterConfigByExplicitFilters(resolvedConfig, filters) {
271
268
  throw new Error(`onlyCategories cannot be an empty array.`);
272
269
  }
273
270
 
274
- warnOnUnknownOnlyCategories(resolvedConfig.categories, onlyCategories);
271
+ errorOnUnknownOnlyCategories(resolvedConfig.categories, onlyCategories);
275
272
 
276
273
  let baseAuditIds = getAuditIdsInCategories(resolvedConfig.categories, undefined);
277
274
  if (onlyCategories) {
@@ -18,7 +18,6 @@ const config = {
18
18
  emulatedUserAgent: constants.userAgents.desktop,
19
19
  skipAudits: [
20
20
  // Skip the h2 audit so it doesn't lie to us. See https://github.com/GoogleChrome/lighthouse/issues/6539
21
- 'uses-http2',
22
21
  'modern-http-insight',
23
22
  // There are always bf-cache failures when testing in headless. Reenable when headless can give us realistic bf-cache insights.
24
23
  'bf-cache',
@@ -17,7 +17,6 @@ const config = {
17
17
  },
18
18
  skipAudits: [
19
19
  // Skip the h2 audit so it doesn't lie to us. See https://github.com/GoogleChrome/lighthouse/issues/6539
20
- 'uses-http2',
21
20
  'modern-http-insight',
22
21
  // There are always bf-cache failures when testing in headless. Reenable when headless can give us realistic bf-cache insights.
23
22
  'bf-cache',
@@ -17,7 +17,7 @@ export class TargetManager extends TargetManager_base {
17
17
  /** @param {LH.Puppeteer.CDPSession} cdpSession */
18
18
  constructor(cdpSession: LH.Puppeteer.CDPSession);
19
19
  _enabled: boolean;
20
- _rootCdpSession: import("../../index.js").Puppeteer.CDPSession;
20
+ _rootCdpSession: import("puppeteer-core").CDPSession;
21
21
  _mainFrameId: string;
22
22
  /**
23
23
  * A map of target id to target/session information. Used to ensure unique
@@ -4,7 +4,7 @@ export class Driver implements LH.Gatherer.Driver {
4
4
  * @param {LH.Puppeteer.Page} page
5
5
  */
6
6
  constructor(page: LH.Puppeteer.Page);
7
- _page: import("../index.js").Puppeteer.Page;
7
+ _page: import("puppeteer-core").Page;
8
8
  /** @type {TargetManager|undefined} */
9
9
  _targetManager: TargetManager | undefined;
10
10
  /** @type {NetworkMonitor|undefined} */
@@ -157,33 +157,17 @@ class AnchorElements extends BaseGatherer {
157
157
 
158
158
  // DOM.getDocument is necessary for pushNodesByBackendIdsToFrontend to properly retrieve nodeIds if the `DOM` domain was enabled before this gatherer, invoke it to be safe.
159
159
  await session.sendCommand('DOM.getDocument', {depth: -1, pierce: true});
160
- const anchorsWithEventListeners = anchors.map(async anchor => {
161
- const listeners = await getEventListeners(session, anchor.node.devtoolsNodePath);
162
-
163
- /** @type {Set<{type: string}>} */
164
- const ancestorListeners = new Set();
165
- const splitPath = anchor.node.devtoolsNodePath.split(',');
166
- const ancestorListenerPromises = [];
167
- while (splitPath.length >= 2) {
168
- splitPath.length -= 2;
169
- const path = splitPath.join(',');
170
- const promise = getEventListeners(session, path).then(listeners => {
171
- for (const listener of listeners) {
172
- ancestorListeners.add(listener);
173
- }
174
- }).catch(() => {});
175
- ancestorListenerPromises.push(promise);
176
- }
177
-
178
- await Promise.all(ancestorListenerPromises);
179
160
 
180
- return {
181
- ...anchor,
182
- listeners,
183
- ancestorListeners: Array.from(ancestorListeners),
184
- };
161
+ const anchorsWithEventListeners = anchors.map( anchor => {
162
+ return getEventListeners(session, anchor.node.devtoolsNodePath).then(listeners => {
163
+ return {
164
+ ...anchor,
165
+ listeners,
166
+ };
167
+ });
185
168
  });
186
169
 
170
+
187
171
  const result = await Promise.all(anchorsWithEventListeners);
188
172
  await session.sendCommand('DOM.disable');
189
173
  return result;
@@ -3,17 +3,16 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- /**
7
- * @fileoverview Gathers all images used on the page with their src, size,
8
- * and attribute information. Executes script in the context of the page.
9
- */
10
6
 
7
+ /**
8
+ * @fileoverview Gathers all images used on the page with their src, size,
9
+ * and attribute information. Executes script in the context of the page.
10
+ */
11
11
 
12
12
  import log from 'lighthouse-logger';
13
13
 
14
14
  import BaseGatherer from '../base-gatherer.js';
15
15
  import {pageFunctions} from '../../lib/page-functions.js';
16
- import * as FontSize from './seo/font-size.js';
17
16
 
18
17
  /* global getElementsInDocument, getNodeDetails */
19
18
 
@@ -186,6 +185,33 @@ function findSizeDeclaration(rule, property) {
186
185
  return definedProp.value;
187
186
  }
188
187
 
188
+ /**
189
+ * Finds the most specific directly matched CSS font-size rule from the list.
190
+ *
191
+ * @param {Array<LH.Crdp.CSS.RuleMatch>} matchedCSSRules
192
+ * @param {function(LH.Crdp.CSS.CSSStyle):boolean|string|undefined} isDeclarationOfInterest
193
+ */
194
+ function findMostSpecificMatchedCSSRule(matchedCSSRules = [], isDeclarationOfInterest) {
195
+ let mostSpecificRule;
196
+ for (let i = matchedCSSRules.length - 1; i >= 0; i--) {
197
+ if (isDeclarationOfInterest(matchedCSSRules[i].rule.style)) {
198
+ mostSpecificRule = matchedCSSRules[i].rule;
199
+ break;
200
+ }
201
+ }
202
+
203
+ if (mostSpecificRule) {
204
+ return {
205
+ type: 'Regular',
206
+ ...mostSpecificRule.style,
207
+ parentRule: {
208
+ origin: mostSpecificRule.origin,
209
+ selectors: mostSpecificRule.selectorList.selectors,
210
+ },
211
+ };
212
+ }
213
+ }
214
+
189
215
  /**
190
216
  * Finds the most specific directly matched CSS font-size rule from the list.
191
217
  *
@@ -196,7 +222,7 @@ function findSizeDeclaration(rule, property) {
196
222
  function findMostSpecificCSSRule(matchedCSSRules, property) {
197
223
  /** @param {LH.Crdp.CSS.CSSStyle} declaration */
198
224
  const isDeclarationofInterest = (declaration) => findSizeDeclaration(declaration, property);
199
- const rule = FontSize.findMostSpecificMatchedCSSRule(matchedCSSRules, isDeclarationofInterest);
225
+ const rule = findMostSpecificMatchedCSSRule(matchedCSSRules, isDeclarationofInterest);
200
226
  if (!rule) return;
201
227
 
202
228
  return findSizeDeclaration(rule, property);
@@ -61,34 +61,7 @@ class InspectorIssues extends BaseGatherer {
61
61
  const networkRecords = await NetworkRecords.request(devtoolsLog, context);
62
62
 
63
63
  /** @type {LH.Artifacts.InspectorIssues} */
64
- const artifact = {
65
- // TODO(v13): remove empty arrays.
66
- attributionReportingIssue: [],
67
- blockedByResponseIssue: [],
68
- bounceTrackingIssue: [],
69
- clientHintIssue: [],
70
- contentSecurityPolicyIssue: [],
71
- cookieDeprecationMetadataIssue: [],
72
- corsIssue: [],
73
- deprecationIssue: [],
74
- federatedAuthRequestIssue: [],
75
- genericIssue: [],
76
- heavyAdIssue: [],
77
- lowTextContrastIssue: [],
78
- mixedContentIssue: [],
79
- navigatorUserAgentIssue: [],
80
- partitioningBlobURLIssue: [],
81
- propertyRuleIssue: [],
82
- quirksModeIssue: [],
83
- cookieIssue: [],
84
- elementAccessibilityIssue: [],
85
- sharedArrayBufferIssue: [],
86
- sharedDictionaryIssue: [],
87
- stylesheetLoadingIssue: [],
88
- sriMessageSignatureIssue: [],
89
- federatedAuthUserInfoRequestIssue: [],
90
- userReidentificationIssue: [],
91
- };
64
+ const artifact = {};
92
65
 
93
66
  for (const issue of this._issues) {
94
67
  const detailsKey = /** @type {keyof LH.Crdp.Audits.InspectorIssueDetails} */(
@@ -32,11 +32,11 @@ declare class TraceElements extends BaseGatherer {
32
32
  * that may have caused the shift.
33
33
  *
34
34
  * @param {LH.Trace} trace
35
- * @param {LH.Artifacts.TraceEngineResult['parsedTrace']} traceEngineResult
35
+ * @param {LH.Artifacts.TraceEngineResult} traceEngineResult
36
36
  * @param {LH.Gatherer.Context} context
37
37
  * @return {Promise<Array<{nodeId: number}>>}
38
38
  */
39
- static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult["parsedTrace"], context: LH.Gatherer.Context): Promise<Array<{
39
+ static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult, context: LH.Gatherer.Context): Promise<Array<{
40
40
  nodeId: number;
41
41
  }>>;
42
42
  /**
@@ -45,15 +45,6 @@ declare class TraceElements extends BaseGatherer {
45
45
  * @return {Promise<TraceElementData|undefined>}
46
46
  */
47
47
  static getResponsivenessElement(trace: LH.Trace, context: LH.Gatherer.Context): Promise<TraceElementData | undefined>;
48
- /**
49
- * @param {LH.Trace} trace
50
- * @param {LH.Gatherer.Context} context
51
- * @return {Promise<{nodeId: number, type: string} | undefined>}
52
- */
53
- static getLcpElement(trace: LH.Trace, context: LH.Gatherer.Context): Promise<{
54
- nodeId: number;
55
- type: string;
56
- } | undefined>;
57
48
  /** @type {LH.Gatherer.GathererMeta<'Trace'|'SourceMaps'>} */
58
49
  meta: LH.Gatherer.GathererMeta<"Trace" | "SourceMaps">;
59
50
  /** @type {Map<string, string>} */
@@ -18,8 +18,6 @@ import {pageFunctions} from '../../lib/page-functions.js';
18
18
  import {Sentry} from '../../lib/sentry.js';
19
19
  import Trace from './trace.js';
20
20
  import {ProcessedTrace} from '../../computed/processed-trace.js';
21
- import {ProcessedNavigation} from '../../computed/processed-navigation.js';
22
- import {LighthouseError} from '../../lib/lh-error.js';
23
21
  import {Responsiveness} from '../../computed/metrics/responsiveness.js';
24
22
  import {CumulativeLayoutShift} from '../../computed/metrics/cumulative-layout-shift.js';
25
23
  import {ExecutionContext} from '../driver/execution-context.js';
@@ -35,7 +33,12 @@ const MAX_LAYOUT_SHIFTS = 15;
35
33
  */
36
34
  /* c8 ignore start */
37
35
  function getNodeDetailsData() {
38
- const elem = this.nodeType === document.ELEMENT_NODE ? this : this.parentElement;
36
+ /** @type {Element|null} */
37
+ let elem = this.nodeType === document.ELEMENT_NODE ? this : this.parentElement;
38
+ if (!elem && this instanceof ShadowRoot) {
39
+ elem = this.host;
40
+ }
41
+
39
42
  let traceElement;
40
43
  if (elem) {
41
44
  // @ts-expect-error - getNodeDetails put into scope via stringification
@@ -173,13 +176,13 @@ class TraceElements extends BaseGatherer {
173
176
  * that may have caused the shift.
174
177
  *
175
178
  * @param {LH.Trace} trace
176
- * @param {LH.Artifacts.TraceEngineResult['parsedTrace']} traceEngineResult
179
+ * @param {LH.Artifacts.TraceEngineResult} traceEngineResult
177
180
  * @param {LH.Gatherer.Context} context
178
181
  * @return {Promise<Array<{nodeId: number}>>}
179
182
  */
180
183
  static async getTopLayoutShifts(trace, traceEngineResult, context) {
181
184
  const {impactByNodeId} = await CumulativeLayoutShift.request(trace, context);
182
- const clusters = traceEngineResult.LayoutShifts.clusters ?? [];
185
+ const clusters = traceEngineResult.data.LayoutShifts.clusters ?? [];
183
186
  const layoutShiftEvents =
184
187
  /** @type {import('../../lib/trace-engine.js').SaneSyntheticLayoutShift[]} */(
185
188
  clusters.flatMap(c => c.events)
@@ -271,35 +274,6 @@ class TraceElements extends BaseGatherer {
271
274
  return animatedElementData;
272
275
  }
273
276
 
274
- /**
275
- * @param {LH.Trace} trace
276
- * @param {LH.Gatherer.Context} context
277
- * @return {Promise<{nodeId: number, type: string} | undefined>}
278
- */
279
- static async getLcpElement(trace, context) {
280
- let processedNavigation;
281
- try {
282
- processedNavigation = await ProcessedNavigation.request(trace, context);
283
- } catch (err) {
284
- // If we were running in timespan mode and there was no paint, treat LCP as missing.
285
- if (context.gatherMode === 'timespan' && err.code === LighthouseError.errors.NO_FCP.code) {
286
- return;
287
- }
288
-
289
- throw err;
290
- }
291
-
292
- // Use main-frame-only LCP to match the metric value.
293
- const lcpData = processedNavigation.largestContentfulPaintEvt?.args?.data;
294
- // These should exist, but trace types are loose.
295
- if (lcpData?.nodeId === undefined || !lcpData.type) return;
296
-
297
- return {
298
- nodeId: lcpData.nodeId,
299
- type: lcpData.type,
300
- };
301
- }
302
-
303
277
  /**
304
278
  * @param {LH.Gatherer.Context} context
305
279
  */
@@ -367,19 +341,15 @@ class TraceElements extends BaseGatherer {
367
341
 
368
342
  const traceEngineData = await TraceElements.getTraceEngineElements(
369
343
  traceEngineResult, navigationId);
370
- const lcpNodeData = await TraceElements.getLcpElement(trace, context);
371
344
  const shiftsData = await TraceElements.getTopLayoutShifts(
372
- trace, traceEngineResult.parsedTrace, context);
345
+ trace, traceEngineResult, context);
373
346
  const animatedElementData = await this.getAnimatedElements(mainThreadEvents);
374
- const responsivenessElementData = await TraceElements.getResponsivenessElement(trace, context);
375
347
 
376
348
  /** @type {Map<string, TraceElementData[]>} */
377
349
  const backendNodeDataMap = new Map([
378
350
  ['trace-engine', traceEngineData],
379
- ['largest-contentful-paint', lcpNodeData ? [lcpNodeData] : []],
380
351
  ['layout-shift', shiftsData],
381
352
  ['animation', animatedElementData],
382
- ['responsiveness', responsivenessElementData ? [responsivenessElementData] : []],
383
353
  ]);
384
354
 
385
355
  /** @type {Map<number, LH.Crdp.Runtime.CallFunctionOnResponse | null>} */
@@ -158,14 +158,11 @@ async function _computeNavigationResult(
158
158
 
159
159
  /** @type {Partial<LH.GathererArtifacts>} */
160
160
  const artifacts = {};
161
- const pageLoadErrorId = 'pageLoadError-defaultPass';
162
161
  if (debugData.devtoolsLog) {
163
162
  artifacts.DevtoolsLogError = debugData.devtoolsLog;
164
- artifacts.devtoolsLogs = {[pageLoadErrorId]: debugData.devtoolsLog};
165
163
  }
166
164
  if (debugData.trace) {
167
165
  artifacts.TraceError = debugData.trace;
168
- artifacts.traces = {[pageLoadErrorId]: debugData.trace};
169
166
  }
170
167
 
171
168
  navigationContext.baseArtifacts.LighthouseRunWarnings.push(pageLoadError.friendlyMessage);
@@ -6,7 +6,7 @@ export class ProtocolSession extends ProtocolSession_base implements LH.Gatherer
6
6
  * @param {LH.Puppeteer.CDPSession} cdpSession
7
7
  */
8
8
  constructor(cdpSession: LH.Puppeteer.CDPSession);
9
- _cdpSession: import("../index.js").Puppeteer.CDPSession;
9
+ _cdpSession: import("puppeteer-core").CDPSession;
10
10
  /** @type {LH.Crdp.Target.TargetInfo|undefined} */
11
11
  _targetInfo: LH.Crdp.Target.TargetInfo | undefined;
12
12
  /** @type {number|undefined} */
@@ -20,8 +20,8 @@ export function saveArtifacts(artifacts: LH.Artifacts, basePath: string, options
20
20
  * step0/ -- Directory containing artifacts for the first step.
21
21
  * options.json -- First step's options (e.g. step flags).
22
22
  * artifacts.json -- First step's artifacts except the DevTools log and trace.
23
- * defaultPass.devtoolslog.json -- First step's DevTools log.
24
- * defaultPass.trace.json -- First step's trace.
23
+ * devtoolslog.json -- First step's DevTools log.
24
+ * trace.json -- First step's trace.
25
25
  * step1/ -- Directory containing artifacts for the second step.
26
26
  *
27
27
  * @param {LH.UserFlow.FlowArtifacts} flowArtifacts
@@ -22,10 +22,9 @@ import {LH_ROOT} from '../../shared/root.js';
22
22
 
23
23
  const optionsFilename = 'options.json';
24
24
  const artifactsFilename = 'artifacts.json';
25
- const traceSuffix = '.trace.json';
26
- const devtoolsLogSuffix = '.devtoolslog.json';
27
- const defaultPrefix = 'defaultPass';
28
- const errorPrefix = 'pageLoadError-defaultPass';
25
+ const traceFilename = 'trace.json';
26
+ const devtoolsFilename = 'devtoolslog.json';
27
+ const errorPrefix = 'pageLoadError.';
29
28
  const stepDirectoryRegex = /^step(\d+)$/;
30
29
 
31
30
  /**
@@ -94,29 +93,26 @@ function loadArtifacts(basePath) {
94
93
 
95
94
  const filenames = fs.readdirSync(basePath);
96
95
 
97
- filenames.filter(f => endsWithSuffix(f, devtoolsLogSuffix)).forEach(filename => {
98
- if (!artifacts.devtoolsLogs) artifacts.devtoolsLogs = {};
99
- const prefix = filename.replace(devtoolsLogSuffix + '.gz', '').replace(devtoolsLogSuffix, '');
96
+ filenames.filter(f => endsWithSuffix(f, devtoolsFilename)).forEach(filename => {
100
97
  const devtoolsLog = readJson(path.join(basePath, filename));
101
- artifacts.devtoolsLogs[prefix] = devtoolsLog;
102
- if (prefix === defaultPrefix) {
98
+
99
+ if (filename.startsWith(devtoolsFilename)) {
103
100
  artifacts.DevtoolsLog = devtoolsLog;
104
- }
105
- if (prefix === errorPrefix) {
101
+ } else if (filename.startsWith(errorPrefix)) {
106
102
  artifacts.DevtoolsLogError = devtoolsLog;
107
103
  }
108
104
  });
109
105
 
110
- filenames.filter(f => endsWithSuffix(f, traceSuffix)).forEach(filename => {
111
- if (!artifacts.traces) artifacts.traces = {};
112
- const trace = readJson(path.join(basePath, filename));
113
- const prefix = filename.replace(traceSuffix + '.gz', '').replace(traceSuffix, '');
114
- artifacts.traces[prefix] = Array.isArray(trace) ? {traceEvents: trace} : trace;
115
- if (prefix === defaultPrefix) {
116
- artifacts.Trace = artifacts.traces[prefix];
106
+ filenames.filter(f => endsWithSuffix(f, traceFilename)).forEach(filename => {
107
+ let trace = readJson(path.join(basePath, filename));
108
+ if (Array.isArray(trace)) {
109
+ trace = {traceEvents: trace};
117
110
  }
118
- if (prefix === errorPrefix) {
119
- artifacts.TraceError = artifacts.traces[prefix];
111
+
112
+ if (filename.startsWith(traceFilename)) {
113
+ artifacts.Trace = trace;
114
+ } else if (filename.startsWith(errorPrefix)) {
115
+ artifacts.TraceError = trace;
120
116
  }
121
117
  });
122
118
 
@@ -196,8 +192,8 @@ function stringifyReplacer(key, value) {
196
192
  * step0/ -- Directory containing artifacts for the first step.
197
193
  * options.json -- First step's options (e.g. step flags).
198
194
  * artifacts.json -- First step's artifacts except the DevTools log and trace.
199
- * defaultPass.devtoolslog.json -- First step's DevTools log.
200
- * defaultPass.trace.json -- First step's trace.
195
+ * devtoolslog.json -- First step's DevTools log.
196
+ * trace.json -- First step's trace.
201
197
  * step1/ -- Directory containing artifacts for the second step.
202
198
  *
203
199
  * @param {LH.UserFlow.FlowArtifacts} flowArtifacts
@@ -254,21 +250,15 @@ async function saveArtifacts(artifacts, basePath, options = {}) {
254
250
  const filenames = fs.readdirSync(basePath);
255
251
  for (const filename of filenames) {
256
252
  const isPreviousFile =
257
- filename.endsWith(traceSuffix) || filename.endsWith(devtoolsLogSuffix) ||
258
- filename.endsWith(traceSuffix + '.gz') || filename.endsWith(devtoolsLogSuffix + '.gz') ||
253
+ filename.endsWith(traceFilename) || filename.endsWith(devtoolsFilename) ||
254
+ filename.endsWith(traceFilename + '.gz') || filename.endsWith(devtoolsFilename + '.gz') ||
259
255
  filename === artifactsFilename || filename === artifactsFilename + '.gz';
260
256
  if (isPreviousFile) {
261
257
  fs.unlinkSync(`${basePath}/${filename}`);
262
258
  }
263
259
  }
264
260
 
265
- // `devtoolsLogs` and `traces` are duplicate compat artifacts.
266
- // We don't need to save them twice, so extract them here. TODO(v13): remove
267
261
  const {
268
- // eslint-disable-next-line no-unused-vars
269
- traces,
270
- // eslint-disable-next-line no-unused-vars
271
- devtoolsLogs,
272
262
  DevtoolsLog,
273
263
  Trace,
274
264
  DevtoolsLogError,
@@ -277,21 +267,21 @@ async function saveArtifacts(artifacts, basePath, options = {}) {
277
267
  } = artifacts;
278
268
 
279
269
  if (Trace) {
280
- await saveTrace(Trace, `${basePath}/${defaultPrefix}${traceSuffix}`, options);
270
+ await saveTrace(Trace, `${basePath}/${traceFilename}`, options);
281
271
  }
282
272
 
283
273
  if (TraceError) {
284
- await saveTrace(TraceError, `${basePath}/${errorPrefix}${traceSuffix}`, options);
274
+ await saveTrace(TraceError, `${basePath}/${errorPrefix}${traceFilename}`, options);
285
275
  }
286
276
 
287
277
  if (DevtoolsLog) {
288
278
  await saveDevtoolsLog(
289
- DevtoolsLog, `${basePath}/${defaultPrefix}${devtoolsLogSuffix}`, options);
279
+ DevtoolsLog, `${basePath}/${devtoolsFilename}`, options);
290
280
  }
291
281
 
292
282
  if (DevtoolsLogError) {
293
283
  await saveDevtoolsLog(
294
- DevtoolsLogError, `${basePath}/${errorPrefix}${devtoolsLogSuffix}`, options);
284
+ DevtoolsLogError, `${basePath}/${errorPrefix}${devtoolsFilename}`, options);
295
285
  }
296
286
 
297
287
  // save everything else, using a replacer to serialize LighthouseErrors in the artifacts.
@@ -452,9 +442,9 @@ async function saveLanternDebugTraces(pathWithBasename) {
452
442
  for (const [label, nodeTimings] of Lantern.Simulation.Simulator.allNodeTimings) {
453
443
  if (lanternTraceSaver.simulationNamesToIgnore.includes(label)) continue;
454
444
 
455
- const traceFilename = `${pathWithBasename}-${label}${traceSuffix}`;
456
- await saveTrace(lanternTraceSaver.convertNodeTimingsToTrace(nodeTimings), traceFilename);
457
- log.log('saveAssets', `${label} lantern trace file streamed to disk: ${traceFilename}`);
445
+ const filename = `${pathWithBasename}-${label}.${traceFilename}`;
446
+ await saveTrace(lanternTraceSaver.convertNodeTimingsToTrace(nodeTimings), filename);
447
+ log.log('saveAssets', `${label} lantern trace file streamed to disk: ${filename}`);
458
448
  }
459
449
  }
460
450
 
@@ -469,15 +459,15 @@ async function saveAssets(artifacts, audits, pathWithBasename) {
469
459
  const allAssets = await prepareAssets(artifacts, audits);
470
460
  const saveAll = allAssets.map(async (assets, index) => {
471
461
  if (assets.devtoolsLog) {
472
- const devtoolsLogFilename = `${pathWithBasename}-${index}${devtoolsLogSuffix}`;
473
- await saveDevtoolsLog(assets.devtoolsLog, devtoolsLogFilename);
474
- log.log('saveAssets', 'devtools log saved to disk: ' + devtoolsLogFilename);
462
+ const filename = `${pathWithBasename}-${index}.${devtoolsFilename}`;
463
+ await saveDevtoolsLog(assets.devtoolsLog, filename);
464
+ log.log('saveAssets', 'devtools log saved to disk: ' + filename);
475
465
  }
476
466
 
477
467
  if (assets.traceData) {
478
- const traceFilename = `${pathWithBasename}-${index}${traceSuffix}`;
479
- await saveTrace(assets.traceData, traceFilename);
480
- log.log('saveAssets', 'trace file streamed to disk: ' + traceFilename);
468
+ const filename = `${pathWithBasename}-${index}.${traceFilename}`;
469
+ await saveTrace(assets.traceData, filename);
470
+ log.log('saveAssets', 'trace file streamed to disk: ' + filename);
481
471
  }
482
472
  });
483
473
 
@@ -534,17 +534,17 @@ const UIStrings = {
534
534
  cookieDisabled:
535
535
  'Back/forward cache is disabled because cookies are disabled on a page that uses `Cache-Control: no-store`.',
536
536
  /**
537
- * @description Description text for not restored reason WebRTCSticky.
537
+ * @description Description text for not restored reason WebRTCUsedWithCCNS.
538
538
  */
539
- webRTCSticky: 'Back/forward cache is disabled because WebRTC has been used.',
539
+ webRTCUsedWithCCNS: 'Back/forward cache is disabled because WebRTC has been used.',
540
540
  /**
541
- * @description Description text for not restored reason WebTransportSticky.
541
+ * @description Description text for not restored reason WebTransportUsedWithCCNS.
542
542
  */
543
- webTransportSticky: 'Back/forward cache is disabled because WebTransport has been used.',
543
+ webTransportUsedWithCCNS: 'Back/forward cache is disabled because WebTransport has been used.',
544
544
  /**
545
- * @description Description text for not restored reason WebSocketSticky.
545
+ * @description Description text for not restored reason WebSocketUsedWithCCNS.
546
546
  */
547
- webSocketSticky: 'Back/forward cache is disabled because WebSocket has been used.',
547
+ webSocketUsedWithCCNS: 'Back/forward cache is disabled because WebSocket has been used.',
548
548
 
549
549
  };
550
550
 
@@ -567,6 +567,7 @@ const NotRestoredReasonDescription = {
567
567
  JavaScriptExecution: {name: str_(UIStrings.JavaScriptExecution)},
568
568
  RendererProcessKilled: {name: str_(UIStrings.rendererProcessKilled)},
569
569
  RendererProcessCrashed: {name: str_(UIStrings.rendererProcessCrashed)},
570
+ // kept for backwards compatibly
570
571
  GrantedMediaStreamAccess: {name: str_(UIStrings.grantedMediaStreamAccess)},
571
572
  CacheFlushed: {name: str_(UIStrings.cacheFlushed)},
572
573
  ServiceWorkerVersionActivation: {name: str_(UIStrings.serviceWorkerVersionActivation)},
@@ -691,9 +692,9 @@ const NotRestoredReasonDescription = {
691
692
  {name: str_(UIStrings.jsNetworkRequestReceivedCacheControlNoStoreResource)},
692
693
  IndexedDBEvent: {name: str_(UIStrings.indexedDBEvent)},
693
694
  CookieDisabled: {name: str_(UIStrings.cookieDisabled)},
694
- WebRTCSticky: {name: str_(UIStrings.webRTCSticky)},
695
- WebTransportSticky: {name: str_(UIStrings.webTransportSticky)},
696
- WebSocketSticky: {name: str_(UIStrings.webSocketSticky)},
695
+ WebRTCUsedWithCCNS: {name: str_(UIStrings.webRTCUsedWithCCNS)},
696
+ WebTransportUsedWithCCNS: {name: str_(UIStrings.webTransportUsedWithCCNS)},
697
+ WebSocketUsedWithCCNS: {name: str_(UIStrings.webSocketUsedWithCCNS)},
697
698
  HTTPAuthRequired: {name: ('HTTPAuthRequired')},
698
699
  CookieFlushed: {name: ('CookieFlushed')},
699
700
  SmartCard: {name: ('SmartCard')},