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

Side by Side Diff: chrome/test/data/third_party/spaceport/js/fullReport.js

Issue 10154006: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 define([ 'tables', 'util/report' ], function (tables, report) {
2 function val(id) {
3 var el = document.getElementById(id);
4 var customEl = document.getElementById(id + '-custom');
5
6 return el.value || (customEl && customEl.value);
7 }
8
9 function getAgentMetadata() {
10 if (typeof window !== 'undefined' && window) {
11 return {
12 userAgent: window.navigator.userAgent,
13 language: window.navigator.language,
14 browser: val('ua-browser'),
15 name: val('ua-device-name'),
16 os: val('ua-os'),
17 type: val('ua-type'),
18 misc: val('ua-misc')
19 };
20 } else {
21 return null;
22 }
23 }
24
25 function csvReport(results, agentMetadata) {
26 agentMetadata = agentMetadata || getAgentMetadata();
27
28 var reports = [ ];
29 if (agentMetadata) {
30 reports.push(report.csvByObject(agentMetadata));
31 }
32
33 Object.keys(tables.performance).forEach(function (testName) {
34 var layout = report.makeTableLayout(tables.performance[testName]);
35 reports.push(report.csvByLayout(results[testName], layout, [ testNam e ]));
36 });
37
38 return reports.join('\n\n') + '\n';
39 }
40
41 return {
42 csvReport: csvReport,
43 getAgentMetadata: getAgentMetadata
44 };
45 });
OLDNEW
« no previous file with comments | « chrome/test/data/third_party/spaceport/js/features.js ('k') | chrome/test/data/third_party/spaceport/js/index.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698