From 6fff8a8d607f27363a4701ab11f017926e83fa63 Mon Sep 17 00:00:00 2001 From: Michael Blasingame Date: Mon, 16 Nov 2020 16:25:47 -0800 Subject: [PATCH 01/11] Delete without-javascript audit --- .../test/cli/__snapshots__/index-test.js.snap | 8 --- .../offline-local/offline-expectations.js | 6 -- .../test-definitions/pwa/pwa-expectations.js | 6 -- .../test-definitions/pwa/pwa2-expectations.js | 6 -- .../test-definitions/pwa/pwa3-expectations.js | 3 - lighthouse-core/audits/without-javascript.js | 62 ------------------- lighthouse-core/config/default-config.js | 2 - lighthouse-core/lib/i18n/locales/en-US.json | 12 ---- lighthouse-core/lib/i18n/locales/en-XL.json | 12 ---- .../test/audits/without-javascript-test.js | 61 ------------------ lighthouse-core/test/results/sample_v2.json | 26 +------- 11 files changed, 1 insertion(+), 203 deletions(-) delete mode 100644 lighthouse-core/audits/without-javascript.js delete mode 100644 lighthouse-core/test/audits/without-javascript-test.js diff --git a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap index 5c248ad3c032..84a68e1fd6a6 100644 --- a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap +++ b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap @@ -18,9 +18,6 @@ Object { Object { "path": "viewport", }, - Object { - "path": "without-javascript", - }, Object { "path": "metrics/first-contentful-paint", }, @@ -1133,11 +1130,6 @@ Object { "id": "viewport", "weight": 2, }, - Object { - "group": "pwa-optimized", - "id": "without-javascript", - "weight": 1, - }, Object { "group": "pwa-optimized", "id": "apple-touch-icon", diff --git a/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-expectations.js b/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-expectations.js index 22ecc0e33f54..1f3e1a2e3519 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-expectations.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-expectations.js @@ -47,9 +47,6 @@ module.exports = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'user-timings': { scoreDisplayMode: 'notApplicable', }, @@ -135,9 +132,6 @@ module.exports = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'user-timings': { scoreDisplayMode: 'notApplicable', }, diff --git a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa-expectations.js b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa-expectations.js index b49621713403..c7091737b888 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa-expectations.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa-expectations.js @@ -36,9 +36,6 @@ const expectations = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'load-fast-enough-for-pwa': { // Ignore speed test; just verify that it ran. }, @@ -101,9 +98,6 @@ const expectations = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'load-fast-enough-for-pwa': { // Ignore speed test; just verify that it ran. }, diff --git a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa2-expectations.js b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa2-expectations.js index d250ae839599..3d820d6ad4bc 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa2-expectations.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa2-expectations.js @@ -39,9 +39,6 @@ module.exports = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'load-fast-enough-for-pwa': { // Ignore speed test; just verify that it ran. }, @@ -108,9 +105,6 @@ module.exports = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'load-fast-enough-for-pwa': { // Ignore speed test; just verify that it ran. }, diff --git a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa3-expectations.js b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa3-expectations.js index 27bc60776c4e..e615378f6633 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa3-expectations.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/pwa/pwa3-expectations.js @@ -39,9 +39,6 @@ module.exports = [ 'viewport': { score: 1, }, - 'without-javascript': { - score: 1, - }, 'load-fast-enough-for-pwa': { // Ignore speed test; just verify that it ran . }, diff --git a/lighthouse-core/audits/without-javascript.js b/lighthouse-core/audits/without-javascript.js deleted file mode 100644 index 839163557fac..000000000000 --- a/lighthouse-core/audits/without-javascript.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @license Copyright 2016 The Lighthouse Authors. All Rights Reserved. - * 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 - * 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. - */ -'use strict'; - -const Audit = require('./audit.js'); -const i18n = require('../lib/i18n/i18n.js'); - -const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the web page's ability to return content with Javascript disabled in the browser. This descriptive title is shown to users when at least some content is shown when Javascript is not available. */ - title: 'Contains some content when JavaScript is not available', - /** Title of a Lighthouse audit that provides detail on the web page's ability to return content with Javascript disabled in the browser. This descriptive title is shown to users when no content is shown when Javascript is not available. */ - failureTitle: 'Does not provide fallback content when JavaScript is not available', - /** Description of a Lighthouse audit that tells the user why they should return content even if Javascript is unavailable in a browser. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ - description: 'Your app should display some content when JavaScript is disabled, even if ' + - 'it\'s just a warning to the user that JavaScript is required to use the app. ' + - '[Learn more](https://web.dev/without-javascript/).', - /** Message explaining that a website's body should render some (any) content even if the page's JavaScript cannot be loaded. */ - explanation: 'The page body should render some content if its scripts are not available.', -}; - -const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); - -class WithoutJavaScript extends Audit { - /** - * @return {LH.Audit.Meta} - */ - static get meta() { - return { - id: 'without-javascript', - title: str_(UIStrings.title), - failureTitle: str_(UIStrings.failureTitle), - description: str_(UIStrings.description), - requiredArtifacts: ['HTMLWithoutJavaScript'], - }; - } - - /** - * @param {LH.Artifacts} artifacts - * @return {LH.Audit.Product} - */ - static audit(artifacts) { - const artifact = artifacts.HTMLWithoutJavaScript; - - // Fail pages that have empty text and are missing a noscript tag - if (artifact.bodyText.trim() === '' && !artifact.hasNoScript) { - return { - score: 0, - explanation: str_(UIStrings.explanation), - }; - } - - return { - score: 1, - }; - } -} - -module.exports = WithoutJavaScript; -module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index 592f383a2b6b..1e017a9c508a 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -191,7 +191,6 @@ const defaultConfig = { 'service-worker', 'works-offline', 'viewport', - 'without-javascript', 'metrics/first-contentful-paint', 'metrics/largest-contentful-paint', 'metrics/first-meaningful-paint', @@ -618,7 +617,6 @@ const defaultConfig = { {id: 'themed-omnibox', weight: 1, group: 'pwa-optimized'}, {id: 'content-width', weight: 1, group: 'pwa-optimized'}, {id: 'viewport', weight: 2, group: 'pwa-optimized'}, - {id: 'without-javascript', weight: 1, group: 'pwa-optimized'}, {id: 'apple-touch-icon', weight: 1, group: 'pwa-optimized'}, {id: 'maskable-icon', weight: 1, group: 'pwa-optimized'}, // Manual audits diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index ef5aa6818ad0..0ec90f4a1fc9 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -1427,18 +1427,6 @@ "lighthouse-core/audits/viewport.js | title": { "message": "Has a `` tag with `width` or `initial-scale`" }, - "lighthouse-core/audits/without-javascript.js | description": { - "message": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://web.dev/without-javascript/)." - }, - "lighthouse-core/audits/without-javascript.js | explanation": { - "message": "The page body should render some content if its scripts are not available." - }, - "lighthouse-core/audits/without-javascript.js | failureTitle": { - "message": "Does not provide fallback content when JavaScript is not available" - }, - "lighthouse-core/audits/without-javascript.js | title": { - "message": "Contains some content when JavaScript is not available" - }, "lighthouse-core/audits/works-offline.js | description": { "message": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://web.dev/works-offline/)." }, diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index 5b4ca31d5e78..bbe8db4b85aa 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -1427,18 +1427,6 @@ "lighthouse-core/audits/viewport.js | title": { "message": "Ĥáŝ á `` t̂áĝ ẃît́ĥ `width` ór̂ `initial-scale`" }, - "lighthouse-core/audits/without-javascript.js | description": { - "message": "Ŷóûŕ âṕp̂ śĥóûĺd̂ d́îśp̂ĺâý ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ d́îśâb́l̂éd̂, év̂én̂ íf̂ ít̂'ś ĵúŝt́ â ẃâŕn̂ín̂ǵ t̂ó t̂h́ê úŝér̂ t́ĥát̂ J́âv́âŚĉŕîṕt̂ íŝ ŕêq́ûír̂éd̂ t́ô úŝé t̂h́ê áp̂ṕ. [L̂éâŕn̂ ḿôŕê](https://web.dev/without-javascript/)." - }, - "lighthouse-core/audits/without-javascript.js | explanation": { - "message": "T̂h́ê ṕâǵê b́ôd́ŷ śĥóûĺd̂ ŕêńd̂ér̂ śôḿê ćôńt̂én̂t́ îf́ ît́ŝ śĉŕîṕt̂ś âŕê ńôt́ âv́âíl̂áb̂ĺê." - }, - "lighthouse-core/audits/without-javascript.js | failureTitle": { - "message": "D̂óêś n̂ót̂ ṕr̂óv̂íd̂é f̂ál̂ĺb̂áĉḱ ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ ńôt́ âv́âíl̂áb̂ĺê" - }, - "lighthouse-core/audits/without-javascript.js | title": { - "message": "Ĉón̂t́âín̂ś ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ ńôt́ âv́âíl̂áb̂ĺê" - }, "lighthouse-core/audits/works-offline.js | description": { "message": "Îf́ ŷóû'ŕê b́ûíl̂d́îńĝ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂, ćôńŝíd̂ér̂ úŝín̂ǵ â śêŕv̂íĉé ŵór̂ḱêŕ ŝó t̂h́ât́ ŷóûŕ âṕp̂ ćâń ŵór̂ḱ ôf́f̂ĺîńê. [Ĺêár̂ń m̂ór̂é](https://web.dev/works-offline/)." }, diff --git a/lighthouse-core/test/audits/without-javascript-test.js b/lighthouse-core/test/audits/without-javascript-test.js deleted file mode 100644 index 132533b7d089..000000000000 --- a/lighthouse-core/test/audits/without-javascript-test.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @license Copyright 2016 The Lighthouse Authors. All Rights Reserved. - * 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 - * 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. - */ -'use strict'; - -/* eslint-env jest */ - -const withoutJsAudit = require('../../audits/without-javascript.js'); -const assert = require('assert').strict; - -describe('Progressive Enhancement: without javascript audit', () => { - it('fails when the js-less body is empty', () => { - const artifacts = { - HTMLWithoutJavaScript: { - bodyText: '', - hasNoScript: false, - }, - }; - - const result = withoutJsAudit.audit(artifacts); - assert.equal(result.score, 0); - assert.ok(result.explanation); - }); - - it('fails when the js-less body is whitespace', () => { - const artifacts = { - HTMLWithoutJavaScript: { - bodyText: ' ', - hasNoScript: false, - }, - }; - - const result = withoutJsAudit.audit(artifacts); - assert.equal(result.score, 0); - assert.ok(result.explanation); - }); - - it('succeeds when the js-less body contains some content', () => { - const artifacts = { - HTMLWithoutJavaScript: { - bodyText: 'test', - hasNoScript: false, - }, - }; - - assert.equal(withoutJsAudit.audit(artifacts).score, 1); - }); - - it('succeeds when the js-less body contains noscript', () => { - const artifacts = { - HTMLWithoutJavaScript: { - bodyText: '', - hasNoScript: true, - }, - }; - - assert.equal(withoutJsAudit.audit(artifacts).score, 1); - }); -}); diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 356d9057c5d5..7422de164beb 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -73,13 +73,6 @@ "scoreDisplayMode": "binary", "warnings": [] }, - "without-javascript": { - "id": "without-javascript", - "title": "Contains some content when JavaScript is not available", - "description": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://web.dev/without-javascript/).", - "score": 1, - "scoreDisplayMode": "binary" - }, "first-contentful-paint": { "id": "first-contentful-paint", "title": "First Contentful Paint", @@ -5213,11 +5206,6 @@ "weight": 2, "group": "pwa-optimized" }, - { - "id": "without-javascript", - "weight": 1, - "group": "pwa-optimized" - }, { "id": "apple-touch-icon", "weight": 1, @@ -5242,7 +5230,7 @@ } ], "id": "pwa", - "score": 0.39 + "score": 0.37 } }, "categoryGroups": { @@ -5401,12 +5389,6 @@ "duration": 100, "entryType": "measure" }, - { - "startTime": 0, - "name": "lh:audit:without-javascript", - "duration": 100, - "entryType": "measure" - }, { "startTime": 0, "name": "lh:audit:first-contentful-paint", @@ -6616,12 +6598,6 @@ "lighthouse-core/audits/viewport.js | description": [ "audits.viewport.description" ], - "lighthouse-core/audits/without-javascript.js | title": [ - "audits[without-javascript].title" - ], - "lighthouse-core/audits/without-javascript.js | description": [ - "audits[without-javascript].description" - ], "lighthouse-core/lib/i18n/i18n.js | firstContentfulPaintMetric": [ "audits[first-contentful-paint].title", "audits[timing-budget].details.items[3].label" From 4d3163ffb41a387e175f3618d70eb952f1667fc6 Mon Sep 17 00:00:00 2001 From: Michael Blasingame Date: Tue, 1 Dec 2020 09:37:44 -0800 Subject: [PATCH 02/11] More clean up --- .../test/cli/__snapshots__/index-test.js.snap | 3 - .../offline-local/offline-config.js | 1 - lighthouse-core/config/default-config.js | 1 - lighthouse-core/gather/driver.js | 2 - .../gatherers/html-without-javascript.js | 56 --------------- lighthouse-core/lib/i18n/locales/ar-XB.json | 12 ---- lighthouse-core/lib/i18n/locales/ar.json | 12 ---- lighthouse-core/lib/i18n/locales/bg.json | 12 ---- lighthouse-core/lib/i18n/locales/ca.json | 12 ---- lighthouse-core/lib/i18n/locales/cs.json | 12 ---- lighthouse-core/lib/i18n/locales/da.json | 12 ---- lighthouse-core/lib/i18n/locales/de.json | 12 ---- lighthouse-core/lib/i18n/locales/el.json | 12 ---- lighthouse-core/lib/i18n/locales/en-GB.json | 12 ---- lighthouse-core/lib/i18n/locales/en-XA.json | 12 ---- lighthouse-core/lib/i18n/locales/es-419.json | 12 ---- lighthouse-core/lib/i18n/locales/es.json | 12 ---- lighthouse-core/lib/i18n/locales/fi.json | 12 ---- lighthouse-core/lib/i18n/locales/fil.json | 12 ---- lighthouse-core/lib/i18n/locales/fr.json | 12 ---- lighthouse-core/lib/i18n/locales/he.json | 12 ---- lighthouse-core/lib/i18n/locales/hi.json | 12 ---- lighthouse-core/lib/i18n/locales/hr.json | 12 ---- lighthouse-core/lib/i18n/locales/hu.json | 12 ---- lighthouse-core/lib/i18n/locales/id.json | 12 ---- lighthouse-core/lib/i18n/locales/it.json | 12 ---- lighthouse-core/lib/i18n/locales/ja.json | 12 ---- lighthouse-core/lib/i18n/locales/ko.json | 12 ---- lighthouse-core/lib/i18n/locales/lt.json | 12 ---- lighthouse-core/lib/i18n/locales/lv.json | 12 ---- lighthouse-core/lib/i18n/locales/nl.json | 12 ---- lighthouse-core/lib/i18n/locales/no.json | 12 ---- lighthouse-core/lib/i18n/locales/pl.json | 12 ---- lighthouse-core/lib/i18n/locales/pt-PT.json | 12 ---- lighthouse-core/lib/i18n/locales/pt.json | 12 ---- lighthouse-core/lib/i18n/locales/ro.json | 12 ---- lighthouse-core/lib/i18n/locales/ru.json | 12 ---- lighthouse-core/lib/i18n/locales/sk.json | 12 ---- lighthouse-core/lib/i18n/locales/sl.json | 12 ---- lighthouse-core/lib/i18n/locales/sr-Latn.json | 12 ---- lighthouse-core/lib/i18n/locales/sr.json | 12 ---- lighthouse-core/lib/i18n/locales/sv.json | 12 ---- lighthouse-core/lib/i18n/locales/ta.json | 12 ---- lighthouse-core/lib/i18n/locales/te.json | 12 ---- lighthouse-core/lib/i18n/locales/th.json | 12 ---- lighthouse-core/lib/i18n/locales/tr.json | 12 ---- lighthouse-core/lib/i18n/locales/uk.json | 12 ---- lighthouse-core/lib/i18n/locales/vi.json | 12 ---- lighthouse-core/lib/i18n/locales/zh-HK.json | 12 ---- lighthouse-core/lib/i18n/locales/zh-TW.json | 12 ---- lighthouse-core/lib/i18n/locales/zh.json | 12 ---- .../gatherers/html-without-javascript-test.js | 68 ------------------- lighthouse-treemap/app/debug.json | 36 ---------- .../lighthouse-export-run-expected.txt | 6 +- .../lighthouse-limited-run-expected.txt | 1 - .../lighthouse-successful-run-expected.txt | 8 +-- types/artifacts.d.ts | 2 - 57 files changed, 4 insertions(+), 732 deletions(-) delete mode 100644 lighthouse-core/gather/gatherers/html-without-javascript.js delete mode 100644 lighthouse-core/test/gather/gatherers/html-without-javascript-test.js diff --git a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap index 061657f90d46..1dfd64d76346 100644 --- a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap +++ b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap @@ -1472,9 +1472,6 @@ Object { Object { "path": "http-redirect", }, - Object { - "path": "html-without-javascript", - }, ], "loadFailureMode": "warn", "networkQuietThresholdMs": 0, diff --git a/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-config.js b/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-config.js index ca2869e018a0..ddeaf2db89df 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-config.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/offline-local/offline-config.js @@ -20,7 +20,6 @@ module.exports = { 'service-worker', 'works-offline', 'viewport', - 'without-javascript', 'user-timings', 'critical-request-chains', 'render-blocking-resources', diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index fb6f56912f51..50cbc77e54cb 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -182,7 +182,6 @@ const defaultConfig = { blockedUrlPatterns: ['*.css', '*.jpg', '*.jpeg', '*.png', '*.gif', '*.svg', '*.ttf', '*.woff', '*.woff2'], gatherers: [ 'http-redirect', - 'html-without-javascript', ], }], audits: [ diff --git a/lighthouse-core/gather/driver.js b/lighthouse-core/gather/driver.js index 74e49554bf9d..1f7f826d9757 100644 --- a/lighthouse-core/gather/driver.js +++ b/lighthouse-core/gather/driver.js @@ -648,7 +648,6 @@ class Driver { const waitForNavigated = options.waitForNavigated || false; const waitForLoad = options.waitForLoad || false; const passContext = /** @type {Partial} */ (options.passContext || {}); - const disableJS = passContext.disableJavaScript || false; if (waitForNavigated && (waitForFcp || waitForLoad)) { throw new Error('Cannot use both waitForNavigated and another event, pick just one'); @@ -667,7 +666,6 @@ class Driver { await this.sendCommand('Page.enable'); await this.sendCommand('Page.setLifecycleEventsEnabled', {enabled: true}); - await this.sendCommand('Emulation.setScriptExecutionDisabled', {value: disableJS}); // No timeout needed for Page.navigate. See https://github.com/GoogleChrome/lighthouse/pull/6413. const waitforPageNavigateCmd = this._innerSendCommand('Page.navigate', undefined, {url}); diff --git a/lighthouse-core/gather/gatherers/html-without-javascript.js b/lighthouse-core/gather/gatherers/html-without-javascript.js deleted file mode 100644 index 4625b08fc92c..000000000000 --- a/lighthouse-core/gather/gatherers/html-without-javascript.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @license Copyright 2016 The Lighthouse Authors. All Rights Reserved. - * 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 - * 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. - */ -'use strict'; - -const Gatherer = require('./gatherer.js'); - -/** - * @fileoverview Returns the innerText of the element while JavaScript is - * disabled. - */ - -/* global document */ - -/* istanbul ignore next */ -function getBodyText() { - // note: we use innerText, not textContent, because textContent includes the content of