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

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/resources/template/main.html

Issue 2252603002: Created a line of summary and enabled suite name onclick function. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <link rel="stylesheet" href="/i/{{master_name}}/default.css" type="text/css" > 5 <link rel="stylesheet" href="/i/{{master_name}}/default.css" type="text/css" >
6 <style> 6 <style>
7 table, th, td { 7 table, th, td {
8 border: 1px solid black; 8 border: 1px solid black;
9 border-collapse: collapse; 9 border-collapse: collapse;
10 } 10 }
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 td a:hover { 29 td a:hover {
30 text-decoration: underline; 30 text-decoration: underline;
31 cursor: pointer; 31 cursor: pointer;
32 } 32 }
33 tr:hover { 33 tr:hover {
34 background-color: #F6F6F6; 34 background-color: #F6F6F6;
35 } 35 }
36 </style> 36 </style>
37 <script type="text/javascript"> 37 <script type="text/javascript">
38 function showTestsOfOneSuiteOnly(suite_name) {
39 var testTableRows = document.getElementById('test_table')
40 .getElementsByClassName('body')[0].getElementsByTagName('tr');
the real yoland 2016/08/18 20:44:56 nit: I believe you can get by tag name with 'tbody
BigBossZhiling 2016/08/23 17:38:51 Done.
41 var testCasePathClass = 0
the real yoland 2016/08/18 20:44:56 nit: ;
42 Array.prototype.slice.call(testTableRows)
43 .forEach(function(row, _) {
the real yoland 2016/08/18 20:44:56 You don't need underscore just `function(row) {`
BigBossZhiling 2016/08/23 17:38:51 Done.
44 var testCasePath = row.getElementsByClassName(
the real yoland 2016/08/18 20:44:56 hmm, I think you should change these <tr> class na
BigBossZhiling 2016/08/23 17:38:51 Done.
45 testCasePathClass)[0].innerText.trim();
46 if (testCasePath.startsWith(suite_name)) {
47 row.style.display = 'table-row';
48 } else {
49 row.style.display = 'none';
50 }
51 })
52 }
53
54 function showAllTests() {
55 var testTableRows = document.getElementById('test_table')
56 .getElementsByClassName('body')[0].getElementsByTagName('tr');
57 Array.prototype.slice.call(testTableRows)
58 .forEach(function(row, _) {
the real yoland 2016/08/18 20:44:56 same, don't need '_'
BigBossZhiling 2016/08/23 17:38:51 Done.
59 row.style.display = 'table-row';
60 })
61 }
62
38 function sortByColumn(head) { 63 function sortByColumn(head) {
39 var tbody = head.parentNode.parentNode.nextElementSibling; 64 var tbody = head.parentNode.parentNode.nextElementSibling;
40 var rows = tbody.rows; 65 var rows = tbody.rows;
41 66
42 // Put 'tr' in rows to an array. 67 // Put 'tr' in rows to an array.
43 var arr = Array.prototype.slice.call(rows); 68 var arr = Array.prototype.slice.call(rows);
44 69
45 // Determine whether to asc or desc and set arrows. 70 // Determine whether to asc or desc and set arrows.
46 var headers = head.parentNode.getElementsByTagName('th'); 71 var headers = head.parentNode.getElementsByTagName('th');
47 var headIndex = Array.prototype.slice.call(headers).indexOf(head); 72 var headIndex = Array.prototype.slice.call(headers).indexOf(head);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 .forEach(function(head, _) { 134 .forEach(function(head, _) {
110 head.addEventListener( 135 head.addEventListener(
111 "click", 136 "click",
112 function() { sortByColumn(head); }, 137 function() { sortByColumn(head); },
113 false 138 false
114 ); 139 );
115 } 140 }
116 ); 141 );
117 </script> 142 </script>
118 </html> 143 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698