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

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

Issue 2863533002: DevTools: Roll lighthouse w/ artifact delivery (Closed)
Patch Set: extra roll of css tweaks 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/templates.html ('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 28 matching lines...) Expand all
39 /** 39 /**
40 * @return {!Promise<!ReportRenderer.ReportJSON>} 40 * @return {!Promise<!ReportRenderer.ReportJSON>}
41 */ 41 */
42 start(params) { 42 start(params) {
43 self.listenForStatus(message => { 43 self.listenForStatus(message => {
44 this.statusUpdate(message[1]); 44 this.statusUpdate(message[1]);
45 }); 45 });
46 46
47 return Promise.resolve() 47 return Promise.resolve()
48 .then(_ => self.runLighthouseInWorker(this, params.url, undefined, params. categoryIDs)) 48 .then(_ => self.runLighthouseInWorker(this, params.url, undefined, params. categoryIDs))
49 .then(/** @type {!ReportRenderer.ReportJSON} */ result => result) 49 .then(/** @type {!ReportRenderer.ReportJSON} */ result => {
50 // Filter out artifacts except for screenshots in traces to minimize re port size.
51 var traces = result.artifacts.traces;
52 for (var pass in traces)
53 traces[pass]['traceEvents'] = traces[pass]['traceEvents'].filter(e => e['cat'] === 'disabled-by-default-devtools.screenshot');
54 result.artifacts = { traces: traces };
55 return result;
56 })
50 .catchException(null); 57 .catchException(null);
51 } 58 }
52 59
53 /** 60 /**
54 * @return {!Promise} 61 * @return {!Promise}
55 */ 62 */
56 stop() { 63 stop() {
57 this.close(); 64 this.close();
58 return Promise.resolve(); 65 return Promise.resolve();
59 } 66 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 }; 112 };
106 113
107 // Make lighthouse and traceviewer happy. 114 // Make lighthouse and traceviewer happy.
108 global = self; 115 global = self;
109 global.isVinn = true; 116 global.isVinn = true;
110 global.document = {}; 117 global.document = {};
111 global.document.documentElement = {}; 118 global.document.documentElement = {};
112 global.document.documentElement.style = { 119 global.document.documentElement.style = {
113 WebkitAppearance: 'WebkitAppearance' 120 WebkitAppearance: 'WebkitAppearance'
114 }; 121 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/templates.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698