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

Unified Diff: tracing/tracing/model/slice_test.html

Issue 2083213002: Change call-sites in trace viewer to use generators instead of iteration functions. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix nits, rebase Created 4 years, 6 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/model/slice_group.html ('k') | tracing/tracing/model/thread.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/slice_test.html
diff --git a/tracing/tracing/model/slice_test.html b/tracing/tracing/model/slice_test.html
index 4a71e1364385cf799189825f6204af4b5128a9fd..a80c080b7e0ce34684eb109dfd92b4023e1a6c2b 100644
--- a/tracing/tracing/model/slice_test.html
+++ b/tracing/tracing/model/slice_test.html
@@ -47,9 +47,8 @@ tr.b.unittest.testSuite(function() {
group.createSubSlices();
var foundSlices = [];
- sC1.findTopmostSlicesRelativeToThisSlice(PREDICATE, slice => (
- foundSlices.push(slice))
- );
+ for (var slice of sC1.findTopmostSlicesRelativeToThisSlice(PREDICATE))
+ foundSlices.push(slice);
assert.deepEqual([sC1], foundSlices);
});
@@ -69,9 +68,8 @@ tr.b.unittest.testSuite(function() {
group.createSubSlices();
var foundSlices = [];
- sD.findTopmostSlicesRelativeToThisSlice(PREDICATE, slice => (
- foundSlices.push(slice)));
-
+ for (var slice of sD.findTopmostSlicesRelativeToThisSlice(PREDICATE))
+ foundSlices.push(slice);
assert.deepEqual([sC1, sC2], foundSlices);
});
« no previous file with comments | « tracing/tracing/model/slice_group.html ('k') | tracing/tracing/model/thread.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698