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

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

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/value_set_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/value_test.html
diff --git a/tracing/tracing/value/value_test.html b/tracing/tracing/value/value_test.html
deleted file mode 100644
index beede793afeb6774ebdeef6f27504d1fe942dd4c..0000000000000000000000000000000000000000
--- a/tracing/tracing/value/value_test.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('numericValueBasic', function() {
- var n = new tr.v.Histogram(tr.b.Unit.byName.sizeInBytes);
- var v = new tr.v.NumericValue('MyNumeric', n);
- v.shortName = 'n';
- assert.isDefined(v.guid);
- var d = v.asDict();
-
- var v2 = tr.v.Value.fromDict(d);
- assert.instanceOf(v2, tr.v.NumericValue);
- assert.strictEqual(v.guid, v2.guid);
- assert.strictEqual(v.name, v2.name);
- assert.strictEqual(v.shortName, v2.shortName);
- });
-
- test('genericDiagnostic', function() {
- var v0 = new tr.v.NumericValue('val',
- tr.v.Histogram.buildFromSamples(tr.b.Unit.byName.count, [42]));
- v0.diagnostics.set('foo', new tr.v.d.Generic({
- t: true,
- f: false,
- z: 0,
- o: 1,
- ans: 0.42,
- s: 'string',
- a: [42.42, 'more string'],
- d: {a: {b: 'c'}}
- }));
- var v1 = tr.v.Value.fromDict(v0.asDict());
- var d = v1.diagnostics.get('foo');
- assert.isTrue(d.value.t);
- assert.isFalse(d.value.f);
- assert.strictEqual(0, d.value.z);
- assert.strictEqual(1, d.value.o);
- assert.strictEqual(0.42, d.value.ans);
- assert.strictEqual('string', d.value.s);
- assert.deepEqual([42.42, 'more string'], d.value.a);
- assert.deepEqual({a: {b: 'c'}}, d.value.d);
- });
-});
-</script>
« no previous file with comments | « tracing/tracing/value/value_set_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698