Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 function getArguments() { | 5 function getArguments() { | 
| 6 // Returns the URL arguments as a dictionary. | 6 // Returns the URL arguments as a dictionary. | 
| 7 args = {} | 7 args = {} | 
| 8 var s = location.search; | 8 var s = location.search; | 
| 9 if (s) { | 9 if (s) { | 
| 10 var vals = s.substring(1).split('&'); | 10 var vals = s.substring(1).split('&'); | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 }); | 184 }); | 
| 185 | 185 | 
| 186 for (var i = 0; i < rowBlocks.length; i++) { | 186 for (var i = 0; i < rowBlocks.length; i++) { | 
| 187 table.appendChild(rowBlocks[i]); | 187 table.appendChild(rowBlocks[i]); | 
| 188 } | 188 } | 
| 189 } | 189 } | 
| 190 | 190 | 
| 191 function sortSuiteTableByFailedTestCases() { | 191 function sortSuiteTableByFailedTestCases() { | 
| 192 sortByColumn(document.getElementById('number_fail_tests')); | 192 sortByColumn(document.getElementById('number_fail_tests')); | 
| 193 } | 193 } | 
| 194 | |
| 195 function setTableCellsAsClickable() { | |
| 196 var tableCells = document.getElementsByTagName('td'); | |
| 
 
mikecase (-- gone --)
2017/05/17 21:20:21
s/var/const ?
 
BigBossZhiling
2017/05/17 23:25:48
Done.
 
 | |
| 197 for(var i = 0; i < tableCells.length; i++) { | |
| 
 
mikecase (-- gone --)
2017/05/17 21:20:21
nit: s/var/let
And then I think you can remove th
 
BigBossZhiling
2017/05/17 23:25:48
Good point. I didn't know about 'let'.
 
 | |
| 198 (function (i){ | |
| 199 var links = tableCells[i].getElementsByTagName('a'); | |
| 
 
mikecase (-- gone --)
2017/05/17 21:20:21
s/var/const
 
BigBossZhiling
2017/05/17 23:25:48
Done.
 
 | |
| 200 if (links.length == 1) { | |
| 201 tableCells[i].addEventListener('click',function() { | |
| 
 
mikecase (-- gone --)
2017/05/17 21:20:21
nit: app space after comma. Same nit applies a few
 
BigBossZhiling
2017/05/17 23:25:48
Done.
 
 | |
| 202 links[0].click(); | |
| 203 }); | |
| 204 tableCells[i].addEventListener('mouseover',function() { | |
| 205 tableCells[i].style.cursor = 'pointer'; | |
| 206 links[0].style.textDecoration = 'underline'; | |
| 207 }); | |
| 208 tableCells[i].addEventListener('mouseout',function() { | |
| 209 tableCells[i].style.cursor = 'initial'; | |
| 210 links[0].style.textDecoration = 'initial'; | |
| 211 }); | |
| 212 } | |
| 213 })(i); | |
| 214 } | |
| 215 } | |
| OLD | NEW |