OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/core/test_utils.html"> | 8 <link rel="import" href="/tracing/core/test_utils.html"> |
9 <link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html"> | 9 <link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html"> |
10 <link rel="import" href="/tracing/value/ui/diagnostic_span.html"> | 10 <link rel="import" href="/tracing/value/ui/diagnostic_span.html"> |
11 | 11 |
12 <script> | 12 <script> |
13 'use strict'; | 13 'use strict'; |
14 | 14 |
15 tr.b.unittest.testSuite(function() { | 15 tr.b.unittest.testSuite(function() { |
16 test('instantiate', function() { | 16 test('instantiate', function() { |
17 const event = tr.c.TestUtils.newSliceEx({ | 17 const event = tr.c.TestUtils.newSliceEx({ |
18 title: 'event', | 18 title: 'event', |
19 start: 0, | 19 start: 0, |
20 duration: 1, | 20 duration: 1, |
21 }); | 21 }); |
22 event.parentContainer = { | 22 event.parentContainer = { |
23 sliceGroup: { | 23 sliceGroup: { |
24 stableId: 'fake_thread', | 24 stableId: 'fake_thread', |
25 slices: [event], | 25 slices: [event], |
26 }, | 26 }, |
27 }; | 27 }; |
28 const diagnostics = new tr.v.d.UnmergeableDiagnosticSet([ | 28 const diagnostics = new tr.v.d.UnmergeableDiagnosticSet([ |
29 new tr.v.d.GenericSet(['generic diagnostic']), | 29 new tr.v.d.GenericSet(['generic diagnostic']), |
30 new tr.v.d.RelatedHistogramMap(), | |
31 new tr.v.d.RelatedEventSet([ | 30 new tr.v.d.RelatedEventSet([ |
32 event, | 31 event, |
33 ]), | 32 ]), |
34 ]); | 33 ]); |
35 const span = tr.v.ui.createDiagnosticSpan(diagnostics); | 34 const span = tr.v.ui.createDiagnosticSpan(diagnostics); |
36 assert.strictEqual('TR-V-UI-UNMERGEABLE-DIAGNOSTIC-SET-SPAN', span.tagName); | 35 assert.strictEqual('TR-V-UI-UNMERGEABLE-DIAGNOSTIC-SET-SPAN', span.tagName); |
37 this.addHTMLOutput(span); | 36 this.addHTMLOutput(span); |
38 }); | 37 }); |
39 }); | 38 }); |
40 </script> | 39 </script> |
OLD | NEW |