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

Side by Side Diff: tracing/tracing/ui/analysis/flow_classifier_test.html

Issue 2955043002: Remove tr.b.asArray. (Closed)
Patch Set: Created 3 years, 5 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/core/test_utils.html"> 9 <link rel="import" href="/tracing/core/test_utils.html">
10 <link rel="import" href="/tracing/ui/analysis/flow_classifier.html"> 10 <link rel="import" href="/tracing/ui/analysis/flow_classifier.html">
(...skipping 19 matching lines...) Expand all
30 30
31 fc.addInFlow(b); 31 fc.addInFlow(b);
32 fc.addOutFlow(b); 32 fc.addOutFlow(b);
33 33
34 fc.addInFlow(c); 34 fc.addInFlow(c);
35 fc.addOutFlow(c); 35 fc.addOutFlow(c);
36 36
37 fc.addOutFlow(d); 37 fc.addOutFlow(d);
38 38
39 function asSortedArray(selection) { 39 function asSortedArray(selection) {
40 const events = tr.b.asArray(selection); 40 const events = Array.from(selection);
41 events.sort(function(a, b) { 41 events.sort(function(a, b) {
42 return a.guid - b.guid; 42 return a.guid - b.guid;
43 }); 43 });
44 return events; 44 return events;
45 } 45 }
46 46
47 assert.deepEqual(tr.b.asArray(fc.inFlowEvents), [a]); 47 assert.deepEqual(Array.from(fc.inFlowEvents), [a]);
48 assert.deepEqual(tr.b.asArray(fc.outFlowEvents), [d]); 48 assert.deepEqual(Array.from(fc.outFlowEvents), [d]);
49 assert.deepEqual(tr.b.asArray(fc.internalFlowEvents), [b, c]); 49 assert.deepEqual(Array.from(fc.internalFlowEvents), [b, c]);
50 }); 50 });
51 }); 51 });
52 </script> 52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698