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

Unified Diff: tracing/tracing/value/ui/histogram_span_test.html

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/value/ui/histogram_span_test.html
diff --git a/tracing/tracing/value/ui/histogram_span_test.html b/tracing/tracing/value/ui/histogram_span_test.html
index bbb60d943f7b799024a350c9f6a1091490103aa3..faddbe4494f86dee33021eaa87fea1f7a4e9d37c 100644
--- a/tracing/tracing/value/ui/histogram_span_test.html
+++ b/tracing/tracing/value/ui/histogram_span_test.html
@@ -15,12 +15,8 @@ found in the LICENSE file.
'use strict';
tr.b.unittest.testSuite(function() {
- var DURATION_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
- tr.v.Unit.byName.timeDurationInMs, tr.b.Range.fromExplicitRange(0, 1000),
- 10);
-
test('basic', function() {
- var h = DURATION_NUMERIC_BUILDER.build();
+ var h = new tr.v.Histogram(tr.v.Unit.byName.unitlessNumber);
h.add(-1, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('a')}));
h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
@@ -46,7 +42,7 @@ tr.b.unittest.testSuite(function() {
});
test('emptyHistogram', function() {
- var h = DURATION_NUMERIC_BUILDER.build();
+ var h = new tr.v.Histogram(tr.v.Unit.byName.unitlessNumber);
var span = document.createElement('tr-v-ui-histogram-span');
span.histogram = h;
@@ -54,7 +50,7 @@ tr.b.unittest.testSuite(function() {
});
test('nans', function() {
- var h = DURATION_NUMERIC_BUILDER.build();
+ var h = new tr.v.Histogram(tr.v.Unit.byName.unitlessNumber);
h.add(undefined, tr.v.d.DiagnosticMap.fromObject(
{foo: new tr.v.d.Generic('b')}));
h.add(NaN, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
« no previous file with comments | « tracing/tracing/value/ui/composition_span_test.html ('k') | tracing/tracing/value/ui/numeric_stats_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698