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/core/test_utils.html"> |
| 9 <link rel="import" href="/tracing/ui/base/deep_utils.html"> |
| 10 <link rel="import" href="/tracing/value/diagnostics/related_name_map.html"> |
| 11 <link rel="import" href="/tracing/value/ui/diagnostic_span.html"> |
| 12 |
| 13 <script> |
| 14 'use strict'; |
| 15 tr.b.unittest.testSuite(function() { |
| 16 test('instantiate', function() { |
| 17 const diagnostic = tr.v.d.RelatedNameMap.fromEntries([['abc', 'def']]); |
| 18 const span = tr.v.ui.createDiagnosticSpan(diagnostic); |
| 19 assert.strictEqual('TR-V-UI-RELATED-NAME-MAP-SPAN', span.tagName); |
| 20 this.addHTMLOutput(span); |
| 21 const link = tr.ui.b.findDeepElementMatching(span, 'tr-ui-a-analysis-link'); |
| 22 assert.strictEqual(link.textContent, 'abc'); |
| 23 assert.strictEqual(link.selection, ['def']); |
| 24 }); |
| 25 }); |
| 26 </script> |
OLD | NEW |