summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span_test.html
blob: 9f6167f1acb7ff43ddf57b3e8671a10cda21a11d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!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/scalar.html">
<link rel="import" href="/tracing/value/ui/diagnostic_span.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {
  test('instantiate', function() {
    const diagnostic = new tr.v.d.Scalar(new tr.b.Scalar(
        tr.b.Unit.byName.timeDurationInMs, 123.456));
    const span = tr.v.ui.createDiagnosticSpan(diagnostic);
    assert.strictEqual('TR-V-UI-SCALAR-DIAGNOSTIC-SPAN', span.tagName);
    this.addHTMLOutput(span);
  });
});
</script>