| OLD | NEW |
| 1 import 'dart:html'; | 1 import 'dart:html'; |
| 2 import 'dart:json' as json; | 2 import 'dart:json' as json; |
| 3 import 'dart:math' as Math; | 3 import 'dart:math' as Math; |
| 4 import 'Suites.dart'; | 4 import 'Suites.dart'; |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 new Dromaeo().run(); | 7 new Dromaeo().run(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 class SuiteController { | 10 class SuiteController { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 static const double _SECS_PER_TEST = 5.0; | 140 static const double _SECS_PER_TEST = 5.0; |
| 141 | 141 |
| 142 Function _createHandler() { | 142 Function _createHandler() { |
| 143 int suitesLoaded = 0; | 143 int suitesLoaded = 0; |
| 144 int totalTests = 0; | 144 int totalTests = 0; |
| 145 int currentSuite; | 145 int currentSuite; |
| 146 double totalTimeSecs, estimatedTimeSecs; | 146 double totalTimeSecs, estimatedTimeSecs; |
| 147 | 147 |
| 148 // TODO(jat): Remove void type below. Bug 5269037. | 148 // TODO(jat): Remove void type below. Bug 5269037. |
| 149 void _updateTime() { | 149 void _updateTime() { |
| 150 final mins = (estimatedTimeSecs / 60).floor().toInt(); | 150 final mins = (estimatedTimeSecs / 60).floor(); |
| 151 final secs = (estimatedTimeSecs - mins * 60).round().toInt(); | 151 final secs = (estimatedTimeSecs - mins * 60).round(); |
| 152 final secsAsString = '${(secs < 10 ? "0" : "")}$secs'; | 152 final secsAsString = '${(secs < 10 ? "0" : "")}$secs'; |
| 153 _byId('left').innerHtml = '${mins}:${secsAsString}'; | 153 _byId('left').innerHtml = '${mins}:${secsAsString}'; |
| 154 | 154 |
| 155 final elapsed = totalTimeSecs - estimatedTimeSecs; | 155 final elapsed = totalTimeSecs - estimatedTimeSecs; |
| 156 final percent = (100 * elapsed / totalTimeSecs).toStringAsFixed(2); | 156 final percent = (100 * elapsed / totalTimeSecs).toStringAsFixed(2); |
| 157 _css(_byId('timebar'), 'width', '${percent}%'); | 157 _css(_byId('timebar'), 'width', '${percent}%'); |
| 158 } | 158 } |
| 159 | 159 |
| 160 Function loading, running, done; | 160 Function loading, running, done; |
| 161 | 161 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 213 } |
| 214 | 214 |
| 215 Element _byId(String id) { | 215 Element _byId(String id) { |
| 216 return document.query('#$id'); | 216 return document.query('#$id'); |
| 217 } | 217 } |
| 218 | 218 |
| 219 int get _suitesTotal { | 219 int get _suitesTotal { |
| 220 return _suiteControllers.length; | 220 return _suiteControllers.length; |
| 221 } | 221 } |
| 222 } | 222 } |
| OLD | NEW |