From f63c523a72f2bab6498af7509674d4390d611639 Mon Sep 17 00:00:00 2001 From: Patrick Hulce Date: Thu, 25 Apr 2019 11:49:36 -0500 Subject: [PATCH] core: reword insecure error message (#8530) --- lighthouse-core/lib/i18n/en-US.json | 4 ++-- lighthouse-core/lib/lh-error.js | 4 ++-- lighthouse-core/test/gather/driver-test.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index edda6fb8d4ae..3c37fd85c737 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -1260,8 +1260,8 @@ "description": "Error message explaining that Lighthouse couldn't complete because the page has stopped responding to its instructions." }, "lighthouse-core/lib/lh-error.js | pageLoadFailedInsecure": { - "message": "The URL you have provided does not have valid security credentials. {securityMessages}", - "description": "Error message explaining that the credentials included in the Lighthouse run were invalid, so the URL cannot be accessed. securityMessages will be replaced with one or more strings from the browser explaining what was insecure about the page load." + "message": "The URL you have provided does not have a valid security certificate. {securityMessages}", + "description": "Error message explaining that the security certificate of the page Lighthouse observed was invalid, so the URL cannot be accessed. securityMessages will be replaced with one or more strings from the browser explaining what was insecure about the page load." }, "lighthouse-core/lib/lh-error.js | pageLoadFailedWithDetails": { "message": "Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})", diff --git a/lighthouse-core/lib/lh-error.js b/lighthouse-core/lib/lh-error.js index a349667fbc03..fdbf06d7abfa 100644 --- a/lighthouse-core/lib/lh-error.js +++ b/lighthouse-core/lib/lh-error.js @@ -21,8 +21,8 @@ const UIStrings = { pageLoadFailedWithStatusCode: 'Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {statusCode})', /** Error message explaining that Lighthouse could not load the requested URL and the steps that might be taken to fix the unreliability. */ pageLoadFailedWithDetails: 'Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})', - /** Error message explaining that the credentials included in the Lighthouse run were invalid, so the URL cannot be accessed. securityMessages will be replaced with one or more strings from the browser explaining what was insecure about the page load. */ - pageLoadFailedInsecure: 'The URL you have provided does not have valid security credentials. {securityMessages}', + /** Error message explaining that the security certificate of the page Lighthouse observed was invalid, so the URL cannot be accessed. securityMessages will be replaced with one or more strings from the browser explaining what was insecure about the page load. */ + pageLoadFailedInsecure: 'The URL you have provided does not have a valid security certificate. {securityMessages}', /** Error message explaining that Chrome has encountered an error during the Lighthouse run, and that Chrome should be restarted. */ internalChromeError: 'An internal Chrome error occurred. Please restart Chrome and try re-running Lighthouse.', /** Error message explaining that fetching the resources of the webpage has taken longer than the maximum time. */ diff --git a/lighthouse-core/test/gather/driver-test.js b/lighthouse-core/test/gather/driver-test.js index e3afa14fa197..cdc961b2a1aa 100644 --- a/lighthouse-core/test/gather/driver-test.js +++ b/lighthouse-core/test/gather/driver-test.js @@ -772,7 +772,8 @@ describe('.gotoURL', () => { } catch (err) { expect(err).toHaveProperty('code', 'INSECURE_DOCUMENT_REQUEST'); expect(err.friendlyMessage).toBeDisplayString( - 'The URL you have provided does not have valid security credentials. reason 1. reason 2.' + 'The URL you have provided does not have a valid security certificate. ' + + 'reason 1. reason 2.' ); } });