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

Unified Diff: tracing/tracing/value/value_set_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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
« no previous file with comments | « tracing/tracing/value/value_set.html ('k') | tracing/tracing_project.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/value_set_test.html
diff --git a/tracing/tracing/value/value_set_test.html b/tracing/tracing/value/value_set_test.html
index a1b48e5e8649dbc945b977d3c6e2afd47ee58e83..658bf77cebaf7217eba1be077d3355e778861ded 100644
--- a/tracing/tracing/value/value_set_test.html
+++ b/tracing/tracing/value/value_set_test.html
@@ -14,6 +14,28 @@ found in the LICENSE file.
'use strict';
tr.b.unittest.testSuite(function() {
+ test('addValuesFromDicts', function() {
+ var n = tr.v.NumericBuilder.createLinear(
+ tr.v.Unit.byName.timeDurationInMs, tr.b.Range.fromExplicitRange(0, 100),
+ 100).build();
+ n.add(10);
+ n.customizeSummaryOptions({
+ count: true,
+ min: false,
+ max: false,
+ sum: true,
+ avg: false,
+ std: false
+ });
+
+ var values = new tr.v.ValueSet([new tr.v.NumericValue('foo', n)]);
+ var values2 = new tr.v.ValueSet();
+ values2.addValuesFromDicts(values.valueDicts);
+ // foo, foo_count, foo_sum
+ assert.lengthOf(values2.getValuesWithName('foo'), 3);
+ assert.lengthOf(values2.getValuesNamed('foo'), 1);
+ });
+
test('computeSummaryValuesForNumericValue', function() {
var n = tr.v.NumericBuilder.createLinear(
tr.v.Unit.byName.timeDurationInMs, tr.b.Range.fromExplicitRange(0, 100),
« no previous file with comments | « tracing/tracing/value/value_set.html ('k') | tracing/tracing_project.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698