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

Side by Side Diff: webkit/tools/layout_tests/dashboards/aggregate_results.html

Issue 208062: Fix up aggregate dashboard to use the new data. The only thing missing now is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | webkit/tools/layout_tests/dashboards/dashboard_base.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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 3
4 <head> 4 <head>
5 <title>Layout test passing status</title> 5 <title>Layout test passing status</title>
6 <style> 6 <style>
7 h2 { 7 h2 {
8 margin: 0; 8 margin: 0;
9 } 9 }
10 h3 { 10 h3 {
(...skipping 24 matching lines...) Expand all
35 var html = ''; 35 var html = '';
36 for (var builder in builders) { 36 for (var builder in builders) {
37 html += getHTMLForBuilder(builder); 37 html += getHTMLForBuilder(builder);
38 } 38 }
39 document.body.innerHTML = html; 39 document.body.innerHTML = html;
40 } 40 }
41 41
42 42
43 function getHTMLForBuilder(builder) { 43 function getHTMLForBuilder(builder) {
44 var results = resultsByBuilder[builder]; 44 var results = resultsByBuilder[builder];
45 // Some keys were added later than others, so they don't have as many
46 // builds. Use the shortest.
47 // TODO(ojan): Once 500 runs have finished, we can get rid of passing this
48 // around and just assume all keys have the same number of builders for a
49 // given builder.
50 var numColumns = results[ALL_FIXABLE_COUNT_KEY].length;
45 return '<div class=container><h2>' + builder + '</h2>' + 51 return '<div class=container><h2>' + builder + '</h2>' +
46 getHTMLForTestType(results, NON_WONTFIX_COUNTS_KEY, 52 getHTMLForSummaryTable(results, numColumns) +
47 NON_WONTFIX_DESCRIPTION) + 53 getHTMLForTestType(results, FIXABLE_COUNTS_KEY, FIXABLE_DESCRIPTION,
48 getHTMLForTestType(results, DEFERRED_COUNTS_KEY, DEFERRED_DESCRIPTION) + 54 numColumns) +
49 getHTMLForTestType(results, ALL_COUNTS_KEY, ALL_COUNTS_DESCRIPTION) + 55 getHTMLForTestType(results, DEFERRED_COUNTS_KEY, DEFERRED_DESCRIPTION,
50 '</div>'; 56 numColumns) +
57 getHTMLForTestType(results, WONTFIX_COUNTS_KEY, WONTFIX_DESCRIPTION,
58 numColumns) + '</div>';
51 } 59 }
52 60
53 function getHTMLForTestType(results, key, description) { 61 function getHTMLForRevisionRows(results, numColumns) {
62 return getHTMLForTableRow('WebKit Revision',
63 results[WEBKIT_REVISIONS_KEY].slice(0, numColumns)) +
64 getHTMLForTableRow('Chrome Revision',
65 results[CHROME_REVISIONS_KEY].slice(0, numColumns));
66 }
67
68 function wrapHTMLInTable(description, html) {
69 return '<h3>' + description + '</h3><table><tbody>' + html +
70 '</tbody></table>';
71 }
72
73 function getHTMLForSummaryTable(results, numColumns) {
74 var percent = [];
75 var fixable = results[FIXABLE_COUNT_KEY].slice(0, numColumns);
76 var allFixable = results[ALL_FIXABLE_COUNT_KEY].slice(0, numColumns);
77 for (var i = 0; i < numColumns; i++) {
78 var percentage = 100 * (allFixable[i] - fixable[i]) / allFixable[i];
79 // Round to the nearest tenth of a percent.
80 percent.push(Math.round(percentage * 10) / 10 + '%');
81 }
82 var html = getHTMLForRevisionRows(results, numColumns) +
83 getHTMLForTableRow('Percent passed', percent) +
84 getHTMLForTableRow('Failures (deduped)', fixable) +
85 getHTMLForTableRow('Fixable Tests', allFixable);
86 return wrapHTMLInTable('Summary', html);
87 }
88
89 function getHTMLForTestType(results, key, description, numColumns) {
54 // TODO(dglazkov): Make these pretty canvasy graphs. 90 // TODO(dglazkov): Make these pretty canvasy graphs.
55 var html = '<h3>' + description + '</h3><table><tbody>';
56 var counts = results[key]; 91 var counts = results[key];
92 var html = getHTMLForRevisionRows(results, numColumns);
57 93
58 var numColumns = counts.length; 94 var valuesForEachRow = {};
59 html += getHTMLForTableRow('WebKit Revision', 95 for (var i = 0; i < numColumns; i++) {
60 results[WEBKIT_REVISIONS_KEY].slice(0, numColumns));
61 html += getHTMLForTableRow('Chrome Revision',
62 results[CHROME_REVISIONS_KEY].slice(0, numColumns));
63 html += getHTMLForTableRow('Failures (deduped)',
64 results[FIXABLE_COUNT_KEY].slice(0, numColumns));
65
66 var htmlForEachRow = {};
67 for (var i = 0; i < counts.length; i++) {
68 for (var expectation in EXPECTATIONS_MAP) { 96 for (var expectation in EXPECTATIONS_MAP) {
69 if (expectation in counts[i]) { 97 if (expectation in counts[i]) {
70 var count = counts[i][expectation]; 98 var count = counts[i][expectation];
71 99
72 if (!htmlForEachRow[expectation]) 100 if (!valuesForEachRow[expectation])
73 htmlForEachRow[expectation] = []; 101 valuesForEachRow[expectation] = [];
74 102
75 htmlForEachRow[expectation].push(count); 103 valuesForEachRow[expectation].push(count);
76 } 104 }
77 } 105 }
78 } 106 }
79 107
80 for (var expectation in htmlForEachRow) { 108 for (var expectation in valuesForEachRow) {
81 html += getHTMLForTableRow(EXPECTATIONS_MAP[expectation], 109 html += getHTMLForTableRow(EXPECTATIONS_MAP[expectation],
82 htmlForEachRow[expectation]); 110 valuesForEachRow[expectation]);
83 } 111 }
84 112
85 return html + '</tbody></table>'; 113 return wrapHTMLInTable(description, html);
86 } 114 }
87 115
88 function getHTMLForTableRow(columnName, values) { 116 function getHTMLForTableRow(columnName, values) {
89 return '<tr><td>' + columnName + '</td><td>' + values.join('</td><td>') + 117 return '<tr><td>' + columnName + '</td><td>' + values.join('</td><td>') +
90 '</td></tr>'; 118 '</td></tr>';
91 } 119 }
92 120
93 </script> 121 </script>
94 </head> 122 </head>
95 <body></body> 123 <body></body>
96 </html> 124 </html>
OLDNEW
« no previous file with comments | « no previous file | webkit/tools/layout_tests/dashboards/dashboard_base.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698