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

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

Issue 2258583003: Modernize DiagnosticMap to subclass ES6 Map. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix longTasksMetric and Composition 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 b2c22f901593dae4eeda23f91f548a24472ca07e..bbb60d943f7b799024a350c9f6a1091490103aa3 100644
--- a/tracing/tracing/value/ui/histogram_span_test.html
+++ b/tracing/tracing/value/ui/histogram_span_test.html
@@ -21,17 +21,18 @@ tr.b.unittest.testSuite(function() {
test('basic', function() {
var h = DURATION_NUMERIC_BUILDER.build();
- h.add(-1, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('a')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(0, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('c')}));
- h.add(500, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('c')}));
- h.add(999, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('d')}));
- h.add(1000, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('d')}));
+ 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')}));
+ 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')}));
+ 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')}));
+ h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
+ h.add(500, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
+ h.add(999, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('d')}));
+ h.add(1000, tr.v.d.DiagnosticMap.fromObject(
+ {foo: new tr.v.d.Generic('d')}));
var span = document.createElement('tr-v-ui-histogram-span');
span.histogram = h;
@@ -54,8 +55,9 @@ tr.b.unittest.testSuite(function() {
test('nans', function() {
var h = DURATION_NUMERIC_BUILDER.build();
- h.add(undefined, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('b')}));
- h.add(NaN, new tr.v.d.DiagnosticMap({foo: new tr.v.d.Generic('c')}));
+ 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')}));
h.customizeSummaryOptions({nans: true});
var span = document.createElement('tr-v-ui-histogram-span');
« no previous file with comments | « tracing/tracing/value/ui/diagnostic_map_table_test.html ('k') | tracing/tracing/value/ui/value_set_table.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698