Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tracing/tracing/model/power_sample_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tracing/tracing/model/object_instance.html ('k') | tracing/tracing/model/power_series.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 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/base/range.html"> 8 <link rel="import" href="/tracing/base/math/range.html">
9 <link rel="import" href="/tracing/model/model.html"> 9 <link rel="import" href="/tracing/model/model.html">
10 <link rel="import" href="/tracing/model/power_sample.html"> 10 <link rel="import" href="/tracing/model/power_sample.html">
11 11
12 <script> 12 <script>
13 'use strict'; 13 'use strict';
14 14
15 tr.b.unittest.testSuite(function() { 15 tr.b.unittest.testSuite(function() {
16 var PowerSample = tr.model.PowerSample; 16 var PowerSample = tr.model.PowerSample;
17 17
18 test('powerSample', function() { 18 test('powerSample', function() {
(...skipping 10 matching lines...) Expand all
29 assert.equal(sample2.start, 1.0); 29 assert.equal(sample2.start, 1.0);
30 assert.equal(sample2.powerInW, 2000.0); 30 assert.equal(sample2.powerInW, 2000.0);
31 }); 31 });
32 32
33 test('addBoundsToRange', function() { 33 test('addBoundsToRange', function() {
34 var series = new tr.model.PowerSeries(new tr.Model().device); 34 var series = new tr.model.PowerSeries(new tr.Model().device);
35 35
36 var sample1 = new PowerSample(series, 0.0, 1000.0); 36 var sample1 = new PowerSample(series, 0.0, 1000.0);
37 var sample2 = new PowerSample(series, 1.0, 2000.0); 37 var sample2 = new PowerSample(series, 1.0, 2000.0);
38 38
39 var range = new tr.b.Range(); 39 var range = new tr.b.math.Range();
40 sample1.addBoundsToRange(range); 40 sample1.addBoundsToRange(range);
41 41
42 assert.equal(range.min, 0); 42 assert.equal(range.min, 0);
43 assert.equal(range.max, 0); 43 assert.equal(range.max, 0);
44 44
45 sample2.addBoundsToRange(range); 45 sample2.addBoundsToRange(range);
46 46
47 assert.equal(range.min, 0); 47 assert.equal(range.min, 0);
48 assert.equal(range.max, 1); 48 assert.equal(range.max, 1);
49 }); 49 });
50 }); 50 });
51 </script> 51 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/model/object_instance.html ('k') | tracing/tracing/model/power_series.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698