Index: tracing/tracing/value/ui/related_name_map_span_test.html |
diff --git a/tracing/tracing/value/ui/related_name_map_span_test.html b/tracing/tracing/value/ui/related_name_map_span_test.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1831521eb3f70626575772380c2020c426db856a |
--- /dev/null |
+++ b/tracing/tracing/value/ui/related_name_map_span_test.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<!-- |
+Copyright 2016 The Chromium Authors. All rights reserved. |
+Use of this source code is governed by a BSD-style license that can be |
+found in the LICENSE file. |
+--> |
+ |
+<link rel="import" href="/tracing/core/test_utils.html"> |
+<link rel="import" href="/tracing/ui/base/deep_utils.html"> |
+<link rel="import" href="/tracing/value/diagnostics/related_name_map.html"> |
+<link rel="import" href="/tracing/value/ui/diagnostic_span.html"> |
+ |
+<script> |
+'use strict'; |
+tr.b.unittest.testSuite(function() { |
+ test('instantiate', function() { |
+ const diagnostic = tr.v.d.RelatedNameMap.fromEntries([['abc', 'def']]); |
+ const span = tr.v.ui.createDiagnosticSpan(diagnostic); |
+ assert.strictEqual('TR-V-UI-RELATED-NAME-MAP-SPAN', span.tagName); |
+ this.addHTMLOutput(span); |
+ const link = tr.ui.b.findDeepElementMatching(span, 'tr-ui-a-analysis-link'); |
+ assert.strictEqual(link.textContent, 'abc'); |
+ assert.strictEqual(link.selection, ['def']); |
+ }); |
+}); |
+</script> |