Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: tracing/tracing/value/ui/related_histogram_map_span_test.html

Issue 3009553002: Refactor Histogram relationship diagnostics. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_map.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_RelatedHistogramMap', function() {
17 const aHist = new tr.v.Histogram('a', tr.b.Unit.byName.timeDurationInMs);
18 const bHist = new tr.v.Histogram('b', tr.b.Unit.byName.timeDurationInMs);
19 aHist.addSample(1);
20 bHist.addSample(2);
21 const diagnostic = new tr.v.d.RelatedHistogramMap();
22 diagnostic.set('foo', aHist);
23 diagnostic.set('bar', bHist);
24 const span = tr.v.ui.createDiagnosticSpan(diagnostic);
25 assert.strictEqual('TR-V-UI-RELATED-HISTOGRAM-MAP-SPAN', span.tagName);
26 this.addHTMLOutput(span);
27 assert.isDefined(
28 tr.ui.b.findDeepElementWithTextContent(span, /Select All/));
29 assert.isDefined(tr.ui.b.findDeepElementWithTextContent(span, /foo/));
30 assert.isDefined(tr.ui.b.findDeepElementWithTextContent(span, /bar/));
31 assert.isDefined(tr.ui.b.findDeepElementWithTextContent(span, /1\.000 ms/));
32 assert.isDefined(tr.ui.b.findDeepElementWithTextContent(span, /2\.000 ms/));
33 });
34 });
35 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/related_histogram_map_span.html ('k') | tracing/tracing/value/ui/related_name_map_span.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698