| 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.RelatedHistogramSet([ | 30 new tr.v.d.RelatedHistogramMap(), |
| 31 new tr.v.Histogram('histogram', tr.b.Unit.byName.count), | |
| 32 ]), | |
| 33 new tr.v.d.RelatedEventSet([ | 31 new tr.v.d.RelatedEventSet([ |
| 34 event, | 32 event, |
| 35 ]), | 33 ]), |
| 36 ]); | 34 ]); |
| 37 const span = tr.v.ui.createDiagnosticSpan(diagnostics); | 35 const span = tr.v.ui.createDiagnosticSpan(diagnostics); |
| 38 assert.strictEqual('TR-V-UI-UNMERGEABLE-DIAGNOSTIC-SET-SPAN', span.tagName); | 36 assert.strictEqual('TR-V-UI-UNMERGEABLE-DIAGNOSTIC-SET-SPAN', span.tagName); |
| 39 this.addHTMLOutput(span); | 37 this.addHTMLOutput(span); |
| 40 }); | 38 }); |
| 41 }); | 39 }); |
| 42 </script> | 40 </script> |
| OLD | NEW |