OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2015 The Chromium Authors. All rights reserved. | 3 Copyright 2015 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/value/time_display_mode.html"> | 8 <link rel="import" href="/tracing/value/time_display_mode.html"> |
9 <link rel="import" href="/tracing/value/unit.html"> | 9 <link rel="import" href="/tracing/value/unit.html"> |
10 <link rel="import" href="/tracing/value/unit_scale.html"> | 10 <link rel="import" href="/tracing/value/unit_scale.html"> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 assert.equal(Unit.byName.powerInWatts.format(.001), '0.001 W'); | 213 assert.equal(Unit.byName.powerInWatts.format(.001), '0.001 W'); |
214 assert.equal(Unit.byName.powerInWatts.format(.001005), '0.001 W'); | 214 assert.equal(Unit.byName.powerInWatts.format(.001005), '0.001 W'); |
215 }); | 215 }); |
216 | 216 |
217 test('unitlessNumber', function() { | 217 test('unitlessNumber', function() { |
218 assert.equal(Unit.byName.unitlessNumber.format(1), '1.000'); | 218 assert.equal(Unit.byName.unitlessNumber.format(1), '1.000'); |
219 assert.equal(Unit.byName.unitlessNumber.format(1.23), '1.230'); | 219 assert.equal(Unit.byName.unitlessNumber.format(1.23), '1.230'); |
220 assert.equal(Unit.byName.unitlessNumber.format(-1.23), '-1.230'); | 220 assert.equal(Unit.byName.unitlessNumber.format(-1.23), '-1.230'); |
221 assert.equal(Unit.byName.unitlessNumber.format(0), '0.000'); | 221 assert.equal(Unit.byName.unitlessNumber.format(0), '0.000'); |
222 }); | 222 }); |
| 223 |
| 224 test('count', function() { |
| 225 assert.equal(Unit.byName.count.format(0), '0'); |
| 226 assert.equal(Unit.byName.count.format(1), '1'); |
| 227 assert.equal(Unit.byName.count.format(100), '100'); |
| 228 }); |
223 }); | 229 }); |
224 </script> | 230 </script> |
OLD | NEW |