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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/renderer/category-renderer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Audits2.Audits2Panel = class extends UI.PanelWithSidebar { 8 Audits2.Audits2Panel = class extends UI.PanelWithSidebar {
9 constructor() { 9 constructor() {
10 super('audits2'); 10 super('audits2');
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 266
267 /** 267 /**
268 * @param {!Error} err 268 * @param {!Error} err
269 * @param {!Element} parentElem 269 * @param {!Element} parentElem
270 */ 270 */
271 _createBugReportLink(err, parentElem) { 271 _createBugReportLink(err, parentElem) {
272 var baseURI = 'https://github.com/GoogleChrome/lighthouse/issues/new?'; 272 var baseURI = 'https://github.com/GoogleChrome/lighthouse/issues/new?';
273 var title = encodeURI('title=DevTools Error: ' + err.message.substring(0, 60 )); 273 var title = encodeURI('title=DevTools Error: ' + err.message.substring(0, 60 ));
274 274
275 var qsBody = ''; 275 var issueBody = `
276 qsBody += '**Initial URL**: ' + this._inspectedURL + '\n'; 276 **Initial URL**: ${this._inspectedURL}
277 qsBody += '**Chrome Version**: ' + navigator.userAgent.match(/Chrome\/(\S+)/ )[1] + '\n'; 277 **Chrome Version**: ${navigator.userAgent.match(/Chrome\/(\S+)/)[1]}
278 qsBody += '**Error Message**: ' + err.message + '\n'; 278 **Error Message**: ${err.message}
279 qsBody += '**Stack Trace**:\n ```' + err.stack + '```'; 279 **Stack Trace**:
280 var body = '&body=' + encodeURI(qsBody); 280 \`\`\`
281 ${err.stack}
282 \`\`\`
283 `;
284 var body = '&body=' + encodeURI(issueBody);
phulce 2017/05/18 00:48:06 wanna trim it too for newlines?
paulirish 2017/05/18 01:03:38 done
281 285
282 var reportErrorEl = parentElem.createChild('a', 'audits2-link audits2-report -error'); 286 var reportErrorEl = parentElem.createChild('a', 'audits2-link audits2-report -error');
283 reportErrorEl.href = baseURI + title + body; 287 reportErrorEl.href = baseURI + title + body;
284 reportErrorEl.textContent = Common.UIString('Report this bug'); 288 reportErrorEl.textContent = Common.UIString('Report this bug');
285 reportErrorEl.target = '_blank'; 289 reportErrorEl.target = '_blank';
286 } 290 }
287 291
288 /** 292 /**
289 * @param {!DataTransfer} dataTransfer 293 * @param {!DataTransfer} dataTransfer
290 */ 294 */
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 return; 646 return;
643 647
644 var element = Components.DOMPresentationUtils.linkifyNodeReference(node, undefined, detailsItem.snippet); 648 var element = Components.DOMPresentationUtils.linkifyNodeReference(node, undefined, detailsItem.snippet);
645 origElement.title = ''; 649 origElement.title = '';
646 origElement.textContent = ''; 650 origElement.textContent = '';
647 origElement.appendChild(element); 651 origElement.appendChild(element);
648 }); 652 });
649 }); 653 });
650 } 654 }
651 }; 655 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/renderer/category-renderer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698