| Index: tracing/tracing/value/ui/composition_span_test.html
|
| diff --git a/tracing/tracing/value/ui/composition_span_test.html b/tracing/tracing/value/ui/composition_span_test.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f8004a78baa016b9f56459b15286c7358d3d4c0d
|
| --- /dev/null
|
| +++ b/tracing/tracing/value/ui/composition_span_test.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<!--
|
| +Copyright 2016 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/value/diagnostics/composition.html">
|
| +<link rel="import" href="/tracing/value/ui/composition_span.html">
|
| +<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
|
| +<link rel="import" href="/tracing/value/value.html">
|
| +
|
| +<script>
|
| +'use strict';
|
| +
|
| +tr.b.unittest.testSuite(function() {
|
| + var TEST_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
|
| + tr.v.Unit.byName.timeDurationInMs, tr.b.Range.fromExplicitRange(0, 1),
|
| + 20);
|
| +
|
| + test('instantiate_Composition', function() {
|
| + var numeric = TEST_NUMERIC_BUILDER.build();
|
| + var scalar = new tr.v.ScalarNumeric(tr.v.Unit.byName.timeDurationInMs, 42);
|
| + for (var i = 0; i < 1e2; ++i) {
|
| + numeric.add(Math.random());
|
| + }
|
| + var composition = new tr.v.d.Composition();
|
| + composition.add(new tr.v.NumericValue('numeric', numeric));
|
| + composition.add(new tr.v.NumericValue('scalar', scalar));
|
| + var span = tr.v.ui.createDiagnosticSpan(composition);
|
| + assert.strictEqual('TR-V-UI-COMPOSITION-SPAN', span.tagName);
|
| + this.addHTMLOutput(span);
|
| + });
|
| +});
|
| +</script>
|
|
|