OLD | NEW |
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 Loading... |
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> |
OLD | NEW |