From 8c14a60a4b6d8b99ee558bb84d94418551c40127 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Mon, 23 Nov 2020 18:24:29 -0600 Subject: [PATCH] tests: rebaseline devtools test, print each .lh-audit id (#11702) --- .../lighthouse-successful-run-expected.txt | 161 +++++++++++++++++- .../lighthouse/lighthouse-successful-run.js | 3 +- 2 files changed, 162 insertions(+), 2 deletions(-) diff --git a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt index 90c4d3ab3da5..68a0fcdd134a 100644 --- a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt +++ b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt @@ -570,5 +570,164 @@ visual-order-follows-dom: manual without-javascript: pass works-offline: fail -# of .lh-audit divs: 156 +# of .lh-audit divs: 157 + +.lh-audit divs: +resource-summary +largest-contentful-paint-element +render-blocking-resources +uses-responsive-images +offscreen-images +unminified-css +unminified-javascript +unused-css-rules +unused-javascript +uses-optimized-images +uses-webp-images +uses-text-compression +uses-rel-preconnect +server-response-time +redirects +uses-rel-preload +uses-http2 +efficient-animated-content +duplicated-javascript +legacy-javascript +preload-lcp-image +total-byte-weight +uses-long-cache-ttl +dom-size +critical-request-chains +user-timings +bootup-time +mainthread-work-breakdown +font-display +third-party-summary +layout-shift-elements +uses-passive-event-listeners +no-document-write +long-tasks +non-composited-animations +unsized-images +document-title +html-has-lang +logical-tab-order +focusable-controls +interactive-element-affordance +managed-focus +focus-traps +custom-controls-labels +custom-controls-roles +visual-order-follows-dom +offscreen-content-hidden +use-landmarks +aria-hidden-body +color-contrast +accesskeys +aria-allowed-attr +aria-hidden-focus +aria-input-field-name +aria-required-attr +aria-required-children +aria-required-parent +aria-roles +aria-toggle-field-name +aria-valid-attr-value +aria-valid-attr +button-name +bypass +definition-list +dlitem +duplicate-id-active +duplicate-id-aria +form-field-multiple-labels +frame-title +heading-order +html-lang-valid +image-alt +input-image-alt +label +layout-table +link-name +list +listitem +meta-refresh +meta-viewport +object-alt +tabindex +td-headers-attr +th-has-data-cells +valid-lang +video-caption +video-description +is-on-https +external-anchors-use-rel-noopener +geolocation-on-start +notification-on-start +no-vulnerable-libraries +password-inputs-can-be-pasted-into +image-aspect-ratio +image-size-responsive +doctype +charset +no-unload-listeners +appcache-manifest +js-libraries +deprecations +errors-in-console +valid-source-maps +has-inspector-issues +preload-fonts +viewport +font-size +tap-targets +document-title +meta-description +structured-data +http-status-code +link-text +crawlable-anchors +is-crawlable +hreflang +plugins +robots-txt +image-alt +canonical +load-fast-enough-for-pwa +works-offline +offline-start-url +is-on-https +service-worker +installable-manifest +redirects-http +splash-screen +themed-omnibox +content-width +viewport +without-javascript +apple-touch-icon +maskable-icon +pwa-cross-browser +pwa-page-transitions +pwa-each-page-has-url +tag-load-time +bid-request-from-page-start +ad-request-from-page-start +first-ad-render +cumulative-ad-shift +gpt-bids-parallel +serial-header-bidding +bottleneck-requests +script-injected-tags +blocking-load-events +ad-render-blocking-resources +ad-blocking-tasks +ad-request-critical-path +ads-in-viewport +async-ad-tags +loads-ad-tag-over-https +loads-gpt-from-official-source +viewport-ad-density +ad-top-of-viewport +duplicate-tags diff --git a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js index 445ac3215f05..9ce7d9db370f 100644 --- a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js +++ b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js @@ -79,8 +79,9 @@ }); const resultsElement = LighthouseTestRunner.getResultsElement(); - const auditElements = resultsElement.querySelectorAll('.lh-audit'); + const auditElements = [...resultsElement.querySelectorAll('.lh-audit')]; TestRunner.addResult(`\n# of .lh-audit divs: ${auditElements.length}`); + TestRunner.addResult(`\n.lh-audit divs:\n${auditElements.map(e => e.id).join('\n')}`); TestRunner.completeTest(); })();