Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js

Issue 2888263002: DevTools: Roll Lighthouse binary to 2.0.1-alpha.0 (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/audits2/audits2Dialog.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js b/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
index 44475267d74e85512c302f094088e782b24eae4b..892f89eb6526f9763edeec144d2689bba9f7f722 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
@@ -298,7 +298,8 @@ Audits2.Audits2Panel = class extends UI.PanelWithSidebar {
console.error(err);
this._statusElement.textContent = '';
this._statusIcon.classList.add('error');
- this._statusElement.createTextChild(Common.UIString('We ran into an error. '));
+ this._statusElement.createTextChild(Common.UIString('Ah, sorry! We ran into an error: '));
+ this._statusElement.createChild('em').createTextChild(err.message);
this._createBugReportLink(err, this._statusElement);
}
@@ -310,13 +311,16 @@ Audits2.Audits2Panel = class extends UI.PanelWithSidebar {
var baseURI = 'https://github.com/GoogleChrome/lighthouse/issues/new?';
var title = encodeURI('title=DevTools Error: ' + err.message.substring(0, 60));
- var qsBody = '';
- qsBody += '**Initial URL**: ' + this._inspectedURL + '\n';
- qsBody += '**Chrome Version**: ' + navigator.userAgent.match(/Chrome\/(\S+)/)[1] + '\n';
- qsBody += '**Error Message**: ' + err.message + '\n';
- qsBody += '**Stack Trace**:\n ```' + err.stack + '```';
- var body = '&body=' + encodeURI(qsBody);
-
+ var issueBody = `
+**Initial URL**: ${this._inspectedURL}
+**Chrome Version**: ${navigator.userAgent.match(/Chrome\/(\S+)/)[1]}
+**Error Message**: ${err.message}
+**Stack Trace**:
+\`\`\`
+${err.stack}
+\`\`\`
+ `;
+ var body = '&body=' + encodeURI(issueBody.trim());
var reportErrorEl = parentElem.createChild('a', 'audits2-link audits2-report-error');
reportErrorEl.href = baseURI + title + body;
reportErrorEl.textContent = Common.UIString('Report this bug');
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/audits2/audits2Dialog.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698