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

Unified Diff: tracing/tracing/value/ui/generic_set_span_test.html

Issue 3003153002: Make generic-set-span support URLs. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/ui/generic_set_span.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/ui/generic_set_span_test.html
diff --git a/tracing/tracing/value/ui/generic_set_span_test.html b/tracing/tracing/value/ui/generic_set_span_test.html
index 88566bc9018b176fbb7c4637c69a8323b3cf857d..9fafb5c8a06f761e9abd0f095eeffaed3a52f6ff 100644
--- a/tracing/tracing/value/ui/generic_set_span_test.html
+++ b/tracing/tracing/value/ui/generic_set_span_test.html
@@ -5,6 +5,8 @@ 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/base/raf.html">
+<link rel="import" href="/tracing/ui/base/deep_utils.html">
<link rel="import" href="/tracing/value/diagnostics/generic_set.html">
<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
@@ -19,20 +21,39 @@ tr.b.unittest.testSuite(function() {
this.addHTMLOutput(span);
});
- test('strings', function() {
+ test('strings', async function() {
const diagnostic = new tr.v.d.GenericSet([
'foo', 'bar', 1, 0, Infinity, NaN,
]);
const span = tr.v.ui.createDiagnosticSpan(diagnostic);
assert.strictEqual('TR-V-UI-GENERIC-SET-SPAN', span.tagName);
this.addHTMLOutput(span);
+ await tr.b.animationFrame();
+ assert.lengthOf(tr.ui.b.findDeepElementsMatchingPredicate(
+ span, e => e.tagName === 'DIV' && e.id === ''), diagnostic.size);
});
- test('numbers', function() {
+ test('numbers', async function() {
const diagnostic = new tr.v.d.GenericSet([10, 1, 0, 2, 11]);
const span = tr.v.ui.createDiagnosticSpan(diagnostic);
assert.strictEqual('TR-V-UI-GENERIC-SET-SPAN', span.tagName);
this.addHTMLOutput(span);
+ await tr.b.animationFrame();
+ assert.lengthOf(tr.ui.b.findDeepElementsMatchingPredicate(
+ span, e => e.tagName === 'DIV' && e.id === ''), diagnostic.size);
+ });
+
+ test('urls', async function() {
+ const diagnostic = new tr.v.d.GenericSet([
+ 'http://cnn.com/',
+ 'http://google.com/',
+ ]);
+ const span = tr.v.ui.createDiagnosticSpan(diagnostic);
+ assert.strictEqual('TR-V-UI-GENERIC-SET-SPAN', span.tagName);
+ this.addHTMLOutput(span);
+ await tr.b.animationFrame();
+ assert.lengthOf(tr.ui.b.findDeepElementsMatching(span, 'a'),
+ diagnostic.size);
});
});
</script>
« no previous file with comments | « tracing/tracing/value/ui/generic_set_span.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698