OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file | 3 // BSD-style license that can be found in the LICENSE file |
4 | 4 |
5 part of mocks; | 5 part of mocks; |
6 | 6 |
7 class HeapSnapshotLoadingProgressEventMock | 7 class HeapSnapshotLoadingProgressEventMock |
8 implements M.HeapSnapshotLoadingProgressEvent { | 8 implements M.HeapSnapshotLoadingProgressEvent { |
9 final M.HeapSnapshotLoadingProgress progress; | 9 final M.HeapSnapshotLoadingProgress progress; |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 typedef Stream< | 32 typedef Stream< |
33 M | 33 M |
34 .HeapSnapshotLoadingProgressEvent> HeapSnapshotRepositoryMockCallback( | 34 .HeapSnapshotLoadingProgressEvent> HeapSnapshotRepositoryMockCallback( |
35 M.IsolateRef cls, bool gc); | 35 M.IsolateRef cls, bool gc); |
36 | 36 |
37 class HeapSnapshotRepositoryMock implements M.HeapSnapshotRepository { | 37 class HeapSnapshotRepositoryMock implements M.HeapSnapshotRepository { |
38 final HeapSnapshotRepositoryMockCallback _get; | 38 final HeapSnapshotRepositoryMockCallback _get; |
39 | 39 |
40 Stream<M.HeapSnapshotLoadingProgressEvent> get(M.IsolateRef isolate, | 40 Stream<M.HeapSnapshotLoadingProgressEvent> get(M.IsolateRef isolate, |
41 {bool gc: false}) { | 41 {M.HeapSnapshotRoots roots: M.HeapSnapshotRoots.vm, bool gc: false}) { |
42 if (_get != null) { | 42 if (_get != null) { |
43 return _get(isolate, gc); | 43 return _get(isolate, gc); |
44 } | 44 } |
45 return null; | 45 return null; |
46 } | 46 } |
47 | 47 |
48 HeapSnapshotRepositoryMock({HeapSnapshotRepositoryMockCallback getter}) | 48 HeapSnapshotRepositoryMock({HeapSnapshotRepositoryMockCallback getter}) |
49 : _get = getter; | 49 : _get = getter; |
50 } | 50 } |
OLD | NEW |