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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js

Issue 2887313002: Revert of DevTools: Roll Lighthouse binary to 2.0.0-alpha.7 (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 | « third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/report-styles.css ('k') | no next file » | 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 * @interface 5 * @interface
6 */ 6 */
7 class LighthousePort { 7 class LighthousePort {
8 /** 8 /**
9 * @param {!string} eventName, 'message', 'close' 9 * @param {!string} eventName, 'message', 'close'
10 * @param {function(string|undefined)} cb 10 * @param {function(string|undefined)} cb
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 .then(/** @type {!ReportRenderer.ReportJSON} */ result => { 49 .then(/** @type {!ReportRenderer.ReportJSON} */ result => {
50 // Filter out artifacts except for screenshots in traces to minimize r eport size. 50 // Filter out artifacts except for screenshots in traces to minimize r eport size.
51 var traces = result.artifacts.traces; 51 var traces = result.artifacts.traces;
52 for (var pass in traces) { 52 for (var pass in traces) {
53 traces[pass]['traceEvents'] = 53 traces[pass]['traceEvents'] =
54 traces[pass]['traceEvents'].filter(e => e['cat'] === 'disabled-b y-default-devtools.screenshot'); 54 traces[pass]['traceEvents'].filter(e => e['cat'] === 'disabled-b y-default-devtools.screenshot');
55 } 55 }
56 result.artifacts = {traces: traces}; 56 result.artifacts = {traces: traces};
57 return result; 57 return result;
58 }) 58 })
59 .catch(err => ({ 59 .catchException(null);
60 fatal: true,
61 message: err.message,
62 stack: err.stack,
63 }));
64 } 60 }
65 61
66 /** 62 /**
67 * @return {!Promise} 63 * @return {!Promise}
68 */ 64 */
69 stop() { 65 stop() {
70 this.close(); 66 this.close();
71 return Promise.resolve(); 67 return Promise.resolve();
72 } 68 }
73 69
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }; 114 };
119 115
120 // Make lighthouse and traceviewer happy. 116 // Make lighthouse and traceviewer happy.
121 global = self; 117 global = self;
122 global.isVinn = true; 118 global.isVinn = true;
123 global.document = {}; 119 global.document = {};
124 global.document.documentElement = {}; 120 global.document.documentElement = {};
125 global.document.documentElement.style = { 121 global.document.documentElement.style = {
126 WebkitAppearance: 'WebkitAppearance' 122 WebkitAppearance: 'WebkitAppearance'
127 }; 123 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/report-styles.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698