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

Side by Side Diff: tracing/tracing/ui/tracks/chart_series_y_axis_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
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/core/test_utils.html"> 9 <link rel="import" href="/tracing/core/test_utils.html">
10 <link rel="import" href="/tracing/ui/tracks/chart_point.html"> 10 <link rel="import" href="/tracing/ui/tracks/chart_point.html">
11 <link rel="import" href="/tracing/ui/tracks/chart_series.html"> 11 <link rel="import" href="/tracing/ui/tracks/chart_series.html">
12 <link rel="import" href="/tracing/ui/tracks/chart_series_y_axis.html"> 12 <link rel="import" href="/tracing/ui/tracks/chart_series_y_axis.html">
13 13
14 <script> 14 <script>
15 'use strict'; 15 'use strict';
16 16
17 tr.b.unittest.testSuite(function() { 17 tr.b.unittest.testSuite(function() {
18 var ChartSeriesYAxis = tr.ui.tracks.ChartSeriesYAxis; 18 var ChartSeriesYAxis = tr.ui.tracks.ChartSeriesYAxis;
19 var ChartPoint = tr.ui.tracks.ChartPoint; 19 var ChartPoint = tr.ui.tracks.ChartPoint;
20 var ChartSeries = tr.ui.tracks.ChartSeries; 20 var ChartSeries = tr.ui.tracks.ChartSeries;
21 var Range = tr.b.Range; 21 var Range = tr.b.math.Range;
22 22
23 function buildRange() { 23 function buildRange() {
24 var range = new Range(); 24 var range = new Range();
25 for (var i = 0; i < arguments.length; i++) 25 for (var i = 0; i < arguments.length; i++)
26 range.addValue(arguments[i]); 26 range.addValue(arguments[i]);
27 return range; 27 return range;
28 } 28 }
29 29
30 function buildSeries() { 30 function buildSeries() {
31 var points = []; 31 var points = [];
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 buildSeries(), 303 buildSeries(),
304 buildSeries(-500) 304 buildSeries(-500)
305 ]; 305 ];
306 306
307 seriesYAxis.autoSetFromSeries(series, {expandMin: true, shrinkMax: true}); 307 seriesYAxis.autoSetFromSeries(series, {expandMin: true, shrinkMax: true});
308 assert.equal(seriesYAxis.bounds.min, -500); 308 assert.equal(seriesYAxis.bounds.min, -500);
309 assert.equal(seriesYAxis.bounds.max, 30); 309 assert.equal(seriesYAxis.bounds.max, 30);
310 }); 310 });
311 }); 311 });
312 </script> 312 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/tracks/chart_series_y_axis.html ('k') | tracing/tracing/ui/tracks/letter_dot_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698