Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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> |
| OLD | NEW |