| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
| 6 * This view displays the progress and results from the "connection tester". | 6 * This view displays the progress and results from the "connection tester". |
| 7 * | 7 * |
| 8 * - Has an input box to specify the URL. | 8 * - Has an input box to specify the URL. |
| 9 * - Has a button to start running the tests. | 9 * - Has a button to start running the tests. |
| 10 * - Shows the set of experiments that have been run so far, and their | 10 * - Shows the set of experiments that have been run so far, and their |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 addTextNode(r.dtCell, (endTime - r.startTime)); | 136 addTextNode(r.dtCell, (endTime - r.startTime)); |
| 137 | 137 |
| 138 r.resultCell.innerHTML = ''; | 138 r.resultCell.innerHTML = ''; |
| 139 | 139 |
| 140 if (result == 0) { | 140 if (result == 0) { |
| 141 r.passFailCell.style.color = 'green'; | 141 r.passFailCell.style.color = 'green'; |
| 142 addTextNode(r.passFailCell, 'PASS'); | 142 addTextNode(r.passFailCell, 'PASS'); |
| 143 } else { | 143 } else { |
| 144 addTextNode(r.resultCell, | 144 addTextNode(r.resultCell, |
| 145 netErrorToString(result) + ' (' + result + ')'); | 145 netErrorToString(result) + ' (' + result + ')'); |
| 146 r.passFailCell.style.color = 'red'; | 146 r.passFailCell.style.color = '#e00'; |
| 147 addTextNode(r.passFailCell, 'FAIL'); | 147 addTextNode(r.passFailCell, 'FAIL'); |
| 148 } | 148 } |
| 149 | 149 |
| 150 this.currentExperimentRow_ = null; | 150 this.currentExperimentRow_ = null; |
| 151 }, | 151 }, |
| 152 | 152 |
| 153 /** | 153 /** |
| 154 * Callback for when the last test in the suite has finished. | 154 * Callback for when the last test in the suite has finished. |
| 155 */ | 155 */ |
| 156 onCompletedConnectionTestSuite: function() { | 156 onCompletedConnectionTestSuite: function() { |
| 157 var p = addNode(this.summaryDiv_, 'p'); | 157 var p = addNode(this.summaryDiv_, 'p'); |
| 158 addTextNode(p, 'Completed connection test suite suite'); | 158 addTextNode(p, 'Completed connection test suite suite'); |
| 159 } | 159 } |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 return TestView; | 162 return TestView; |
| 163 })(); | 163 })(); |
| OLD | NEW |