summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/catapult/tracing/tracing/value/ui/date_range_span_test.html
blob: 3e7f02f0727a73ca9ebd29305fa55c510b6fce4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<!--
Copyright 2017 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/date_range.html">
<link rel="import" href="/tracing/value/ui/diagnostic_span.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {
  test('instantiate_one', function() {
    const diagnostic = new tr.v.d.DateRange(1496693745398);
    const span = tr.v.ui.createDiagnosticSpan(diagnostic);
    assert.strictEqual('TR-V-UI-DATE-RANGE-SPAN', span.tagName);
    this.addHTMLOutput(span);
  });

  test('instantiate_merged', function() {
    const diagnostic = new tr.v.d.DateRange(1496693745398);
    diagnostic.addDiagnostic(new tr.v.d.DateRange(1496693745399));
    const span = tr.v.ui.createDiagnosticSpan(diagnostic);
    assert.strictEqual('TR-V-UI-DATE-RANGE-SPAN', span.tagName);
    this.addHTMLOutput(span);
  });
});
</script>