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

Side by Side Diff: tracing/tracing/value/ui/value_set_view_test.html

Issue 2283213002: Rename Histogram.add() to addSample(). (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 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/histogram.html"> 8 <link rel="import" href="/tracing/value/histogram.html">
9 <link rel="import" href="/tracing/value/ui/value_set_table.html"> 9 <link rel="import" href="/tracing/value/ui/value_set_table.html">
10 <link rel="import" href="/tracing/value/ui/value_set_view.html"> 10 <link rel="import" href="/tracing/value/ui/value_set_view.html">
11 <link rel="import" href="/tracing/value/value_set.html"> 11 <link rel="import" href="/tracing/value/value_set.html">
12 12
13 <script> 13 <script>
14 'use strict'; 14 'use strict';
15 15
16 tr.b.unittest.testSuite(function() { 16 tr.b.unittest.testSuite(function() {
17 test('instantiate0', function() { 17 test('instantiate0', function() {
18 var view = document.createElement('tr-v-ui-value-set-view'); 18 var view = document.createElement('tr-v-ui-value-set-view');
19 var values = new tr.v.ValueSet(); 19 var values = new tr.v.ValueSet();
20 20
21 var numeric = new tr.v.Histogram(tr.v.Unit.byName.normalizedPercentage); 21 var hist = new tr.v.Histogram(tr.v.Unit.byName.normalizedPercentage);
22 for (var i = 0; i < 1e2; ++i) { 22 for (var i = 0; i < 1e2; ++i)
23 numeric.add(Math.random()); 23 hist.addSample(Math.random());
24 } 24 var foo = new tr.v.NumericValue('foo', hist, {description: 'bar'});
25 var foo = new tr.v.NumericValue('foo', numeric, {description: 'bar'});
26 values.addValue(foo); 25 values.addValue(foo);
27 26
28 this.addHTMLOutput(view); 27 this.addHTMLOutput(view);
29 view.values = values; 28 view.values = values;
30 }); 29 });
31 }); 30 });
32 </script> 31 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/value_set_table_test.html ('k') | tracing/tracing/value/value_set_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698