lighthouse 9.5.0-dev.20220830 → 9.5.0-dev.20220902

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 (370) hide show
  1. package/build-tracker.config.js +0 -1
  2. package/cli/test/smokehouse/frontends/smokehouse-bin.js +13 -16
  3. package/commitlint.config.js +0 -1
  4. package/core/audits/accessibility/accesskeys.js +0 -2
  5. package/core/audits/accessibility/aria-allowed-attr.js +0 -2
  6. package/core/audits/accessibility/aria-command-name.js +0 -2
  7. package/core/audits/accessibility/aria-hidden-body.js +0 -2
  8. package/core/audits/accessibility/aria-hidden-focus.js +0 -2
  9. package/core/audits/accessibility/aria-input-field-name.js +0 -2
  10. package/core/audits/accessibility/aria-meter-name.js +0 -2
  11. package/core/audits/accessibility/aria-progressbar-name.js +0 -2
  12. package/core/audits/accessibility/aria-required-attr.js +0 -2
  13. package/core/audits/accessibility/aria-required-children.js +0 -2
  14. package/core/audits/accessibility/aria-required-parent.js +0 -2
  15. package/core/audits/accessibility/aria-roles.js +0 -2
  16. package/core/audits/accessibility/aria-toggle-field-name.js +0 -2
  17. package/core/audits/accessibility/aria-tooltip-name.js +0 -2
  18. package/core/audits/accessibility/aria-treeitem-name.js +0 -2
  19. package/core/audits/accessibility/aria-valid-attr-value.js +0 -2
  20. package/core/audits/accessibility/aria-valid-attr.js +0 -2
  21. package/core/audits/accessibility/axe-audit.js +0 -2
  22. package/core/audits/accessibility/button-name.js +0 -2
  23. package/core/audits/accessibility/bypass.js +0 -2
  24. package/core/audits/accessibility/color-contrast.js +0 -2
  25. package/core/audits/accessibility/definition-list.js +0 -2
  26. package/core/audits/accessibility/dlitem.js +0 -2
  27. package/core/audits/accessibility/document-title.js +0 -2
  28. package/core/audits/accessibility/duplicate-id-active.js +0 -2
  29. package/core/audits/accessibility/duplicate-id-aria.js +0 -2
  30. package/core/audits/accessibility/form-field-multiple-labels.js +0 -2
  31. package/core/audits/accessibility/frame-title.js +0 -2
  32. package/core/audits/accessibility/heading-order.js +0 -2
  33. package/core/audits/accessibility/html-has-lang.js +0 -2
  34. package/core/audits/accessibility/html-lang-valid.js +0 -2
  35. package/core/audits/accessibility/image-alt.js +0 -2
  36. package/core/audits/accessibility/input-image-alt.js +0 -2
  37. package/core/audits/accessibility/label.js +0 -2
  38. package/core/audits/accessibility/link-name.js +0 -2
  39. package/core/audits/accessibility/list.js +0 -2
  40. package/core/audits/accessibility/listitem.js +0 -2
  41. package/core/audits/accessibility/manual/custom-controls-labels.js +0 -1
  42. package/core/audits/accessibility/manual/custom-controls-roles.js +0 -1
  43. package/core/audits/accessibility/manual/focus-traps.js +0 -1
  44. package/core/audits/accessibility/manual/focusable-controls.js +0 -1
  45. package/core/audits/accessibility/manual/interactive-element-affordance.js +0 -1
  46. package/core/audits/accessibility/manual/logical-tab-order.js +0 -1
  47. package/core/audits/accessibility/manual/managed-focus.js +0 -1
  48. package/core/audits/accessibility/manual/offscreen-content-hidden.js +0 -1
  49. package/core/audits/accessibility/manual/use-landmarks.js +0 -1
  50. package/core/audits/accessibility/manual/visual-order-follows-dom.js +0 -1
  51. package/core/audits/accessibility/meta-refresh.js +0 -2
  52. package/core/audits/accessibility/meta-viewport.js +0 -2
  53. package/core/audits/accessibility/object-alt.js +0 -2
  54. package/core/audits/accessibility/tabindex.js +0 -2
  55. package/core/audits/accessibility/td-headers-attr.js +0 -2
  56. package/core/audits/accessibility/th-has-data-cells.js +0 -2
  57. package/core/audits/accessibility/valid-lang.js +0 -2
  58. package/core/audits/accessibility/video-caption.js +0 -2
  59. package/core/audits/audit.js +0 -1
  60. package/core/audits/autocomplete.js +2 -2
  61. package/core/audits/bootup-time.js +0 -1
  62. package/core/audits/byte-efficiency/byte-efficiency-audit.js +0 -1
  63. package/core/audits/byte-efficiency/duplicated-javascript.js +0 -2
  64. package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
  65. package/core/audits/byte-efficiency/legacy-javascript.js +0 -2
  66. package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
  67. package/core/audits/byte-efficiency/offscreen-images.js +1 -1
  68. package/core/audits/byte-efficiency/render-blocking-resources.js +1 -1
  69. package/core/audits/byte-efficiency/total-byte-weight.js +0 -1
  70. package/core/audits/byte-efficiency/unminified-css.js +0 -1
  71. package/core/audits/byte-efficiency/unminified-javascript.js +0 -1
  72. package/core/audits/byte-efficiency/unused-css-rules.js +0 -1
  73. package/core/audits/byte-efficiency/unused-javascript.js +0 -1
  74. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +1 -1
  75. package/core/audits/byte-efficiency/uses-optimized-images.js +1 -1
  76. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +1 -1
  77. package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
  78. package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
  79. package/core/audits/content-width.js +0 -1
  80. package/core/audits/critical-request-chains.js +0 -1
  81. package/core/audits/csp-xss.js +0 -1
  82. package/core/audits/deprecations.js +0 -2
  83. package/core/audits/diagnostics.js +0 -1
  84. package/core/audits/dobetterweb/charset.js +1 -1
  85. package/core/audits/dobetterweb/doctype.js +0 -1
  86. package/core/audits/dobetterweb/dom-size.js +0 -1
  87. package/core/audits/dobetterweb/geolocation-on-start.js +0 -1
  88. package/core/audits/dobetterweb/inspector-issues.js +0 -2
  89. package/core/audits/dobetterweb/js-libraries.js +0 -1
  90. package/core/audits/dobetterweb/no-document-write.js +0 -1
  91. package/core/audits/dobetterweb/notification-on-start.js +0 -1
  92. package/core/audits/dobetterweb/password-inputs-can-be-pasted-into.js +0 -1
  93. package/core/audits/dobetterweb/uses-http2.js +0 -2
  94. package/core/audits/dobetterweb/uses-passive-event-listeners.js +0 -1
  95. package/core/audits/errors-in-console.js +0 -1
  96. package/core/audits/final-screenshot.js +0 -1
  97. package/core/audits/font-display.js +0 -1
  98. package/core/audits/full-page-screenshot.js +0 -1
  99. package/core/audits/image-aspect-ratio.js +1 -1
  100. package/core/audits/image-size-responsive.js +1 -1
  101. package/core/audits/installable-manifest.js +0 -1
  102. package/core/audits/is-on-https.js +0 -1
  103. package/core/audits/largest-contentful-paint-element.js +0 -1
  104. package/core/audits/layout-shift-elements.js +0 -1
  105. package/core/audits/lcp-lazy-loaded.js +4 -4
  106. package/core/audits/long-tasks.js +0 -1
  107. package/core/audits/main-thread-tasks.js +0 -1
  108. package/core/audits/mainthread-work-breakdown.js +0 -1
  109. package/core/audits/manual/manual-audit.js +0 -1
  110. package/core/audits/manual/pwa-cross-browser.js +0 -1
  111. package/core/audits/manual/pwa-each-page-has-url.js +0 -1
  112. package/core/audits/manual/pwa-page-transitions.js +0 -1
  113. package/core/audits/maskable-icon.js +0 -1
  114. package/core/audits/metrics/cumulative-layout-shift.js +0 -1
  115. package/core/audits/metrics/experimental-interaction-to-next-paint.js +0 -1
  116. package/core/audits/metrics/first-contentful-paint-3g.js +0 -1
  117. package/core/audits/metrics/first-contentful-paint.js +0 -1
  118. package/core/audits/metrics/first-meaningful-paint.js +0 -1
  119. package/core/audits/metrics/interactive.js +0 -1
  120. package/core/audits/metrics/largest-contentful-paint.js +0 -1
  121. package/core/audits/metrics/max-potential-fid.js +0 -1
  122. package/core/audits/metrics/speed-index.js +0 -1
  123. package/core/audits/metrics/total-blocking-time.js +0 -1
  124. package/core/audits/metrics.js +0 -1
  125. package/core/audits/multi-check-audit.js +0 -1
  126. package/core/audits/network-requests.js +1 -1
  127. package/core/audits/network-rtt.js +0 -1
  128. package/core/audits/network-server-latency.js +0 -1
  129. package/core/audits/no-unload-listeners.js +0 -1
  130. package/core/audits/non-composited-animations.js +0 -2
  131. package/core/audits/oopif-iframe-test-audit.js +0 -1
  132. package/core/audits/performance-budget.js +0 -1
  133. package/core/audits/predictive-perf.js +0 -1
  134. package/core/audits/preload-fonts.js +0 -2
  135. package/core/audits/preload-lcp-image.js +7 -6
  136. package/core/audits/redirects.js +0 -1
  137. package/core/audits/resource-summary.js +0 -1
  138. package/core/audits/screenshot-thumbnails.js +2 -2
  139. package/core/audits/script-elements-test-audit.js +0 -1
  140. package/core/audits/script-treemap-data.js +0 -2
  141. package/core/audits/seo/canonical.js +0 -1
  142. package/core/audits/seo/crawlable-anchors.js +0 -1
  143. package/core/audits/seo/font-size.js +0 -2
  144. package/core/audits/seo/hreflang.js +0 -2
  145. package/core/audits/seo/http-status-code.js +0 -1
  146. package/core/audits/seo/is-crawlable.js +1 -3
  147. package/core/audits/seo/link-text.js +0 -1
  148. package/core/audits/seo/manual/structured-data.js +0 -1
  149. package/core/audits/seo/meta-description.js +0 -1
  150. package/core/audits/seo/plugins.js +1 -2
  151. package/core/audits/seo/robots-txt.js +1 -3
  152. package/core/audits/seo/tap-targets.js +1 -4
  153. package/core/audits/server-response-time.js +0 -1
  154. package/core/audits/service-worker.js +0 -1
  155. package/core/audits/splash-screen.js +0 -1
  156. package/core/audits/themed-omnibox.js +2 -2
  157. package/core/audits/third-party-facades.js +0 -2
  158. package/core/audits/third-party-summary.js +0 -1
  159. package/core/audits/timing-budget.js +0 -1
  160. package/core/audits/unsized-images.js +0 -1
  161. package/core/audits/user-timings.js +0 -1
  162. package/core/audits/uses-rel-preconnect.js +0 -2
  163. package/core/audits/uses-rel-preload.js +0 -1
  164. package/core/audits/valid-source-maps.js +0 -1
  165. package/core/audits/viewport.js +0 -1
  166. package/core/audits/violation-audit.js +0 -1
  167. package/core/audits/work-during-interaction.js +0 -1
  168. package/core/computed/computed-artifact.js +2 -2
  169. package/core/computed/critical-request-chains.js +0 -1
  170. package/core/computed/image-records.js +0 -1
  171. package/core/computed/js-bundles.js +1 -1
  172. package/core/computed/load-simulator.js +0 -1
  173. package/core/computed/main-resource.js +0 -1
  174. package/core/computed/main-thread-tasks.js +0 -1
  175. package/core/computed/manifest-values.js +0 -1
  176. package/core/computed/metrics/cumulative-layout-shift.js +0 -1
  177. package/core/computed/metrics/first-contentful-paint-all-frames.js +0 -1
  178. package/core/computed/metrics/first-contentful-paint.js +0 -1
  179. package/core/computed/metrics/first-meaningful-paint.js +0 -1
  180. package/core/computed/metrics/interactive.js +0 -1
  181. package/core/computed/metrics/lantern-first-contentful-paint.js +0 -1
  182. package/core/computed/metrics/lantern-first-meaningful-paint.js +0 -1
  183. package/core/computed/metrics/lantern-interactive.js +0 -1
  184. package/core/computed/metrics/lantern-largest-contentful-paint.js +0 -1
  185. package/core/computed/metrics/lantern-max-potential-fid.js +0 -1
  186. package/core/computed/metrics/lantern-metric.js +0 -1
  187. package/core/computed/metrics/lantern-speed-index.js +0 -1
  188. package/core/computed/metrics/lantern-total-blocking-time.js +0 -1
  189. package/core/computed/metrics/largest-contentful-paint-all-frames.js +0 -2
  190. package/core/computed/metrics/largest-contentful-paint.js +0 -2
  191. package/core/computed/metrics/max-potential-fid.js +0 -1
  192. package/core/computed/metrics/metric.js +0 -1
  193. package/core/computed/metrics/navigation-metric.js +0 -1
  194. package/core/computed/metrics/responsiveness.js +0 -1
  195. package/core/computed/metrics/speed-index.js +0 -1
  196. package/core/computed/metrics/tbt-utils.js +0 -1
  197. package/core/computed/metrics/timing-summary.js +0 -1
  198. package/core/computed/metrics/total-blocking-time.js +0 -1
  199. package/core/computed/module-duplication.js +0 -1
  200. package/core/computed/network-analysis.js +0 -1
  201. package/core/computed/network-records.js +0 -1
  202. package/core/computed/page-dependency-graph.js +0 -1
  203. package/core/computed/processed-navigation.js +0 -1
  204. package/core/computed/processed-trace.js +0 -1
  205. package/core/computed/resource-summary.js +0 -1
  206. package/core/computed/screenshots.js +0 -1
  207. package/core/computed/speedline.js +2 -2
  208. package/core/computed/unused-css.js +0 -1
  209. package/core/computed/unused-javascript-summary.js +0 -1
  210. package/core/computed/user-timings.js +0 -1
  211. package/core/computed/viewport-meta.js +1 -1
  212. package/core/config/budget.js +0 -1
  213. package/core/config/config-helpers.js +2 -1
  214. package/core/config/config-plugin.js +0 -1
  215. package/core/config/config.js +4 -4
  216. package/core/config/constants.js +0 -1
  217. package/core/config/default-config.js +2 -4
  218. package/core/config/desktop-config.js +0 -1
  219. package/core/config/experimental-config.js +0 -1
  220. package/core/config/full-config.js +0 -1
  221. package/core/config/legacy-default-config.js +0 -1
  222. package/core/config/lr-desktop-config.js +0 -1
  223. package/core/config/lr-mobile-config.js +0 -1
  224. package/core/config/metrics-to-audits.js +0 -1
  225. package/core/config/perf-config.js +0 -1
  226. package/core/fraggle-rock/api.js +0 -1
  227. package/core/fraggle-rock/config/config.js +2 -5
  228. package/core/fraggle-rock/config/filters.js +1 -1
  229. package/core/fraggle-rock/config/validation.js +0 -1
  230. package/core/fraggle-rock/gather/base-artifacts.js +1 -1
  231. package/core/fraggle-rock/gather/base-gatherer.js +0 -1
  232. package/core/fraggle-rock/gather/driver.js +1 -1
  233. package/core/fraggle-rock/gather/navigation-runner.js +1 -1
  234. package/core/fraggle-rock/gather/runner-helpers.js +0 -1
  235. package/core/fraggle-rock/gather/session.js +1 -1
  236. package/core/fraggle-rock/gather/snapshot-runner.js +1 -1
  237. package/core/fraggle-rock/gather/timespan-runner.js +1 -1
  238. package/core/fraggle-rock/replay/stringify-extension.js +0 -1
  239. package/core/fraggle-rock/user-flow.js +0 -1
  240. package/core/gather/connections/connection.js +2 -1
  241. package/core/gather/connections/cri.js +4 -3
  242. package/core/gather/connections/raw.js +0 -1
  243. package/core/gather/driver/dom.js +0 -1
  244. package/core/gather/driver/environment.js +1 -1
  245. package/core/gather/driver/execution-context.js +0 -1
  246. package/core/gather/driver/navigation.js +1 -1
  247. package/core/gather/driver/network-monitor.js +2 -2
  248. package/core/gather/driver/network.js +0 -1
  249. package/core/gather/driver/prepare.js +1 -1
  250. package/core/gather/driver/service-workers.js +0 -1
  251. package/core/gather/driver/storage.js +1 -1
  252. package/core/gather/driver/target-manager.js +2 -1
  253. package/core/gather/driver/wait-for-condition.js +0 -1
  254. package/core/gather/driver.js +4 -3
  255. package/core/gather/fetcher.js +0 -1
  256. package/core/gather/gather-runner.js +1 -1
  257. package/core/gather/gatherers/accessibility.js +0 -2
  258. package/core/gather/gatherers/anchor-elements.js +0 -2
  259. package/core/gather/gatherers/cache-contents.js +0 -1
  260. package/core/gather/gatherers/console-messages.js +0 -1
  261. package/core/gather/gatherers/css-usage.js +2 -2
  262. package/core/gather/gatherers/devtools-log-compat.js +0 -2
  263. package/core/gather/gatherers/devtools-log.js +0 -1
  264. package/core/gather/gatherers/dobetterweb/doctype.js +0 -1
  265. package/core/gather/gatherers/dobetterweb/domstats.js +0 -1
  266. package/core/gather/gatherers/dobetterweb/optimized-images.js +2 -1
  267. package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.js +0 -2
  268. package/core/gather/gatherers/dobetterweb/response-compression.js +3 -2
  269. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +0 -1
  270. package/core/gather/gatherers/full-page-screenshot.js +0 -2
  271. package/core/gather/gatherers/gatherer.js +0 -1
  272. package/core/gather/gatherers/global-listeners.js +0 -1
  273. package/core/gather/gatherers/iframe-elements.js +0 -2
  274. package/core/gather/gatherers/image-elements.js +2 -1
  275. package/core/gather/gatherers/inputs.js +0 -2
  276. package/core/gather/gatherers/inspector-issues.js +0 -1
  277. package/core/gather/gatherers/installability-errors.js +1 -1
  278. package/core/gather/gatherers/js-usage.js +0 -1
  279. package/core/gather/gatherers/link-elements.js +1 -1
  280. package/core/gather/gatherers/main-document-content.js +0 -1
  281. package/core/gather/gatherers/meta-elements.js +0 -1
  282. package/core/gather/gatherers/network-user-agent.js +0 -1
  283. package/core/gather/gatherers/script-elements.js +0 -1
  284. package/core/gather/gatherers/scripts.js +0 -1
  285. package/core/gather/gatherers/seo/embedded-content.js +0 -2
  286. package/core/gather/gatherers/seo/font-size.js +0 -1
  287. package/core/gather/gatherers/seo/robots-txt.js +0 -1
  288. package/core/gather/gatherers/seo/tap-targets.js +0 -2
  289. package/core/gather/gatherers/service-worker.js +0 -1
  290. package/core/gather/gatherers/source-maps.js +0 -1
  291. package/core/gather/gatherers/stacks.js +2 -2
  292. package/core/gather/gatherers/trace-compat.js +0 -2
  293. package/core/gather/gatherers/trace-elements.js +32 -15
  294. package/core/gather/gatherers/trace.js +0 -2
  295. package/core/gather/gatherers/viewport-dimensions.js +0 -1
  296. package/core/gather/gatherers/web-app-manifest.js +1 -1
  297. package/core/index.js +5 -3
  298. package/core/lib/arbitrary-equality-map.js +0 -1
  299. package/core/lib/asset-saver.js +3 -2
  300. package/core/lib/axe.js +0 -1
  301. package/core/lib/cdt/Common.js +0 -1
  302. package/core/lib/cdt/Platform.js +0 -1
  303. package/core/lib/cdt/SDK.js +1 -1
  304. package/core/lib/csp-evaluator.js +1 -2
  305. package/core/lib/dependency-graph/base-node.js +0 -1
  306. package/core/lib/dependency-graph/cpu-node.js +0 -1
  307. package/core/lib/dependency-graph/network-node.js +0 -1
  308. package/core/lib/dependency-graph/simulator/connection-pool.js +0 -1
  309. package/core/lib/dependency-graph/simulator/dns-cache.js +0 -1
  310. package/core/lib/dependency-graph/simulator/network-analyzer.js +0 -1
  311. package/core/lib/dependency-graph/simulator/simulator-timing-map.js +0 -1
  312. package/core/lib/dependency-graph/simulator/simulator.js +0 -1
  313. package/core/lib/dependency-graph/simulator/tcp-connection.js +0 -1
  314. package/core/lib/emulation.js +0 -1
  315. package/core/lib/i18n/i18n.js +2 -2
  316. package/core/lib/icons.js +0 -1
  317. package/core/lib/lantern-trace-saver.js +0 -1
  318. package/core/lib/lh-env.js +0 -1
  319. package/core/lib/lh-error.js +0 -1
  320. package/core/lib/lh-trace-processor.js +0 -1
  321. package/core/lib/manifest-parser.js +2 -2
  322. package/core/lib/median-run.js +1 -1
  323. package/core/lib/minification-estimator.js +0 -1
  324. package/core/lib/minify-devtoolslog.js +0 -1
  325. package/core/lib/minify-trace.js +0 -1
  326. package/core/lib/navigation-error.js +0 -1
  327. package/core/lib/network-recorder.js +3 -2
  328. package/core/lib/network-request.js +0 -1
  329. package/core/lib/page-functions.js +0 -1
  330. package/core/lib/proto-preprocessor.js +1 -2
  331. package/core/lib/rect-helpers.js +0 -1
  332. package/core/lib/script-helpers.js +0 -1
  333. package/core/lib/sentry.js +0 -1
  334. package/core/lib/stack-packs.js +1 -1
  335. package/core/lib/statistics.js +0 -1
  336. package/core/lib/tappable-rects.js +0 -1
  337. package/core/lib/third-party-web.js +0 -1
  338. package/core/lib/timing-trace-saver.js +0 -1
  339. package/core/lib/tracehouse/cpu-profile-model.js +0 -1
  340. package/core/lib/tracehouse/main-thread-tasks.js +0 -1
  341. package/core/lib/tracehouse/task-groups.js +0 -1
  342. package/core/lib/tracehouse/task-summary.js +0 -1
  343. package/core/lib/tracehouse/trace-processor.js +0 -1
  344. package/core/lib/traces/metric-trace-events.js +1 -1
  345. package/core/lib/url-shim.js +0 -2
  346. package/core/runner.js +5 -4
  347. package/core/scoring.js +0 -2
  348. package/dist/report/bundle.esm.js +1 -1
  349. package/dist/report/flow.js +1 -1
  350. package/dist/report/standalone.js +1 -1
  351. package/esm-utils.js +0 -2
  352. package/package.json +1 -1
  353. package/report/assets/styles.css +1 -1
  354. package/report/renderer/components.js +1 -1
  355. package/root.js +1 -1
  356. package/shared/localization/format.js +2 -1
  357. package/shared/localization/i18n-module.js +0 -1
  358. package/shared/localization/locales.js +1 -1
  359. package/shared/localization/swap-flow-locale.js +0 -1
  360. package/shared/localization/swap-locale.js +0 -1
  361. package/shared/test/localization/format-test.js +0 -1
  362. package/shared/test/localization/locales-test.js +2 -2
  363. package/shared/test/localization/swap-locale-test.js +0 -1
  364. package/shared/type-verifiers.js +0 -1
  365. package/types/artifacts.d.ts +1 -0
  366. package/cli/package.json +0 -4
  367. package/core/package.json +0 -4
  368. package/core/scripts/package.json +0 -4
  369. package/flow-report/package.json +0 -4
  370. package/report/package.json +0 -4
@@ -9,7 +9,6 @@
9
9
  * page load. This is often a sign of poor user experience because it lacks context.
10
10
  */
11
11
 
12
- 'use strict';
13
12
 
14
13
  import ViolationAudit from '../violation-audit.js';
15
14
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -10,13 +10,11 @@
10
10
  * https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/sdk/
11
11
  */
12
12
 
13
- 'use strict';
14
13
 
15
14
  /** @typedef {{url: string}} IssueSubItem */
16
15
  /** @typedef {{issueType: string|LH.IcuMessage, subItems: Array<IssueSubItem>}} IssueItem */
17
16
 
18
17
  import {Audit} from '../audit.js';
19
-
20
18
  import * as i18n from '../../lib/i18n/i18n.js';
21
19
 
22
20
  const UIStrings = {
@@ -8,7 +8,6 @@
8
8
  * @fileoverview Diagnostic audit that lists all JavaScript libraries detected on the page
9
9
  */
10
10
 
11
- 'use strict';
12
11
 
13
12
  import {Audit} from '../audit.js';
14
13
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -26,7 +26,6 @@
26
26
  * "Parser was blocked due to document.write(<script>)". src: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/frame/performance_monitor.cc?l=294-300&rcl=40b90cafad9f219e0845879ed8648bdcc96116dc
27
27
  */
28
28
 
29
- 'use strict';
30
29
 
31
30
  import ViolationAudit from '../violation-audit.js';
32
31
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -9,7 +9,6 @@
9
9
  * page load. This is often a sign of poor user experience because it lacks context.
10
10
  */
11
11
 
12
- 'use strict';
13
12
 
14
13
  import ViolationAudit from '../violation-audit.js';
15
14
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview Audit a page to ensure that resource loaded over its own
@@ -14,7 +13,6 @@
14
13
  /** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
15
14
 
16
15
  import {Audit} from '../audit.js';
17
-
18
16
  import ThirdParty from '../../lib/third-party-web.js';
19
17
  import URL from '../../lib/url-shim.js';
20
18
  import {ByteEfficiencyAudit} from '../byte-efficiency/byte-efficiency-audit.js';
@@ -9,7 +9,6 @@
9
9
  * scroll-blocking touch and wheel event listeners.
10
10
  */
11
11
 
12
- 'use strict';
13
12
 
14
13
  import ViolationAudit from '../violation-audit.js';
15
14
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview Audits a page to determine whether it contains console errors.
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import {LighthouseError} from '../lib/lh-error.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import URL from '../lib/url-shim.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
 
@@ -9,7 +9,7 @@
9
9
  * audit will list all images that don't match with their display size
10
10
  * aspect ratio.
11
11
  */
12
- 'use strict';
12
+
13
13
 
14
14
  import {Audit} from './audit.js';
15
15
  import URL from '../lib/url-shim.js';
@@ -8,7 +8,7 @@
8
8
  * the page are large enough with respect to the pixel ratio. The
9
9
  * audit will list all visible images that are too small.
10
10
  */
11
- 'use strict';
11
+
12
12
 
13
13
  import {Audit} from './audit.js';
14
14
  import URL from '../lib/url-shim.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import URL from '../lib/url-shim.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -50,8 +49,9 @@ class LargestContentfulPaintLazyLoaded extends Audit {
50
49
  * @return {LH.Audit.Product}
51
50
  */
52
51
  static audit(artifacts) {
53
- const lcpElement = artifacts.TraceElements
54
- .find(element => element.traceEventType === 'largest-contentful-paint');
52
+ const lcpElement = artifacts.TraceElements.find(element => {
53
+ return element.traceEventType === 'largest-contentful-paint' && element.type === 'image';
54
+ });
55
55
  const lcpElementImage = lcpElement ? artifacts.ImageElements.find(elem => {
56
56
  return elem.node.devtoolsNodePath === lcpElement.node.devtoolsNodePath;
57
57
  }) : undefined;
@@ -59,7 +59,7 @@ class LargestContentfulPaintLazyLoaded extends Audit {
59
59
 
60
60
  if (!lcpElementImage ||
61
61
  !this.isImageInViewport(lcpElementImage, artifacts.ViewportDimensions)) {
62
- return {score: 1, notApplicable: true};
62
+ return {score: null, notApplicable: true};
63
63
  }
64
64
 
65
65
  /** @type {LH.Audit.Details.Table['headings']} */
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import NetworkRecords from '../computed/network-records.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import MainThreadTasksComputed from '../computed/main-thread-tasks.js';
@@ -8,7 +8,6 @@
8
8
  * @fileoverview Audit a page to show a breakdown of execution timings on the main thread
9
9
  */
10
10
 
11
- 'use strict';
12
11
 
13
12
  import {Audit} from './audit.js';
14
13
  import {taskGroups} from '../lib/tracehouse/task-groups.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview Base class for audits that the user should verify manually on
@@ -4,7 +4,6 @@
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
5
5
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
6
6
  */
7
- 'use strict';
8
7
 
9
8
  import ManualAudit from './manual-audit.js';
10
9
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import ManualAudit from './manual-audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import ManualAudit from './manual-audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import ManifestValues from '../computed/manifest-values.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import ComputedCLS from '../../computed/metrics/cumulative-layout-shift.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import ComputedResponsivenes from '../../computed/metrics/responsiveness.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import ComputedFcp from '../../computed/metrics/first-contentful-paint.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import ComputedFid from '../../computed/metrics/max-potential-fid.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import * as i18n from '../../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from '../audit.js';
9
8
  import ComputedTBT from '../../computed/metrics/total-blocking-time.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import ComputedTimingSummary from '../computed/metrics/timing-summary.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview Base class for boolean audits that can have multiple reasons for failure
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import URL from '../lib/url-shim.js';
@@ -73,6 +72,7 @@ class NetworkRequests extends Audit {
73
72
  statusCode: record.statusCode,
74
73
  mimeType: record.mimeType,
75
74
  resourceType: record.resourceType,
75
+ priority: record.priority,
76
76
  isLinkPreload,
77
77
  experimentalFromMainFrame,
78
78
  lrEndTimeDeltaMs: endTimeDeltaMs, // Only exists on Lightrider runs
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import JsBundles from '../computed/js-bundles.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview Audit which reports all animations that failed to composite along
@@ -12,7 +11,6 @@
12
11
  */
13
12
 
14
13
  import {Audit} from './audit.js';
15
-
16
14
  import * as i18n from '../lib/i18n/i18n.js';
17
15
 
18
16
  const UIStrings = {
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview This is a fake audit used exclusively in smoke tests to force inclusion of IFrameElements artifact.
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import ResourceSummary from '../computed/resource-summary.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview
@@ -11,7 +10,6 @@
11
10
  */
12
11
 
13
12
  import {Audit} from './audit.js';
14
-
15
13
  import * as i18n from './../lib/i18n/i18n.js';
16
14
  import FontDisplay from './../audits/font-display.js';
17
15
  const PASSING_FONT_DISPLAY_REGEX = /^(optional)$/;
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import * as i18n from '../lib/i18n/i18n.js';
@@ -88,13 +87,11 @@ class PreloadLCPImageAudit extends Audit {
88
87
  /**
89
88
  * @param {LH.Artifacts.NetworkRequest} mainResource
90
89
  * @param {LH.Gatherer.Simulation.GraphNode} graph
91
- * @param {LH.Artifacts.TraceElement|undefined} lcpElement
90
+ * @param {LH.Artifacts.TraceElement} lcpElement
92
91
  * @param {Array<LH.Artifacts.ImageElement>} imageElements
93
92
  * @return {{lcpNodeToPreload?: LH.Gatherer.Simulation.GraphNetworkNode, initiatorPath?: InitiatorPath}}
94
93
  */
95
94
  static getLCPNodeToPreload(mainResource, graph, lcpElement, imageElements) {
96
- if (!lcpElement) return {};
97
-
98
95
  const lcpImageElement = imageElements.find(elem => {
99
96
  return elem.node.devtoolsNodePath === lcpElement.node.devtoolsNodePath;
100
97
  });
@@ -121,14 +118,14 @@ class PreloadLCPImageAudit extends Audit {
121
118
 
122
119
  /**
123
120
  * Computes the estimated effect of preloading the LCP image.
124
- * @param {LH.Artifacts.TraceElement|undefined} lcpElement
121
+ * @param {LH.Artifacts.TraceElement} lcpElement
125
122
  * @param {LH.Gatherer.Simulation.GraphNetworkNode|undefined} lcpNode
126
123
  * @param {LH.Gatherer.Simulation.GraphNode} graph
127
124
  * @param {LH.Gatherer.Simulation.Simulator} simulator
128
125
  * @return {{wastedMs: number, results: Array<{node: LH.Audit.Details.NodeValue, url: string, wastedMs: number}>}}
129
126
  */
130
127
  static computeWasteWithGraph(lcpElement, lcpNode, graph, simulator) {
131
- if (!lcpElement || !lcpNode) {
128
+ if (!lcpNode) {
132
129
  return {
133
130
  wastedMs: 0,
134
131
  results: [],
@@ -222,6 +219,10 @@ class PreloadLCPImageAudit extends Audit {
222
219
  const lcpElement = artifacts.TraceElements
223
220
  .find(element => element.traceEventType === 'largest-contentful-paint');
224
221
 
222
+ if (!lcpElement || lcpElement.type !== 'image') {
223
+ return {score: null, notApplicable: true};
224
+ }
225
+
225
226
  const [mainResource, lanternLCP, simulator] = await Promise.all([
226
227
  MainResource.request({devtoolsLog, URL}, context),
227
228
  LanternLCP.request(metricData, context),
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import {ByteEfficiencyAudit} from './byte-efficiency/byte-efficiency-audit.js';
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  import {Audit} from './audit.js';
9
8
  import ComputedResourceSummary from '../computed/resource-summary.js';
@@ -3,11 +3,11 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
6
+
7
+ import jpeg from 'jpeg-js';
7
8
 
8
9
  import {Audit} from './audit.js';
9
10
  import {LighthouseError} from '../lib/lh-error.js';
10
- import jpeg from 'jpeg-js';
11
11
  import Speedline from '../computed/speedline.js';
12
12
 
13
13
  const NUMBER_OF_THUMBNAILS = 10;
@@ -3,7 +3,6 @@
3
3
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
- 'use strict';
7
6
 
8
7
  /**
9
8
  * @fileoverview This is a fake audit used exclusively in smoke tests to force inclusion of ScriptElements artifact.