OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <!-- | |
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 | |
5 found in the LICENSE file. | |
6 --> | |
7 | |
8 <link rel="import" href="/tracing/value/diagnostics/related_histogram_set.html"> | |
9 <link rel="import" href="/tracing/value/histogram.html"> | |
10 <link rel="import" href="/tracing/value/ui/diagnostic_span.html"> | |
11 | |
12 <script> | |
13 'use strict'; | |
14 | |
15 tr.b.unittest.testSuite(function() { | |
16 test('instantiate_RelatedHistogramSet', function() { | |
17 const aValue = new tr.v.Histogram('foo', tr.b.Unit.byName.unitlessNumber); | |
18 const bValue = new tr.v.Histogram('bar', tr.b.Unit.byName.unitlessNumber); | |
19 const diagnostic = new tr.v.d.RelatedHistogramSet([aValue, bValue]); | |
20 const span = tr.v.ui.createDiagnosticSpan(diagnostic); | |
21 assert.strictEqual('TR-V-UI-RELATED-HISTOGRAM-SET-SPAN', span.tagName); | |
22 this.addHTMLOutput(span); | |
23 assert.isDefined(tr.ui.b.findDeepElementMatchingPredicate( | |
24 span, function(element) { | |
25 return element.textContent === 'Select All'; | |
26 })); | |
27 assert.isDefined(tr.ui.b.findDeepElementMatchingPredicate( | |
28 span, function(element) { | |
29 return element.textContent === 'foo'; | |
30 })); | |
31 assert.isDefined(tr.ui.b.findDeepElementMatchingPredicate( | |
32 span, function(element) { | |
33 return element.textContent === 'bar'; | |
34 })); | |
35 }); | |
36 }); | |
37 </script> | |
OLD | NEW |