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

Side by Side Diff: runtime/observatory/tests/observatory_ui/mocks/repositories/target.dart

Issue 2979433002: Fixed observatory_ui/vm_connect test in checked mode (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 TargetChangeEventMock implements M.TargetChangeEvent { 7 class TargetChangeEventMock implements M.TargetChangeEvent {
8 final TargetRepositoryMock repository; 8 final TargetRepositoryMock repository;
9 const TargetChangeEventMock({this.repository}); 9 const TargetChangeEventMock({this.repository});
10 } 10 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void delete(M.Target target) { 54 void delete(M.Target target) {
55 deleteInvoked = true; 55 deleteInvoked = true;
56 if (_delete != null) _delete(target); 56 if (_delete != null) _delete(target);
57 } 57 }
58 58
59 void triggerChangeEvent() { 59 void triggerChangeEvent() {
60 _onChange.add(new TargetChangeEventMock(repository: this)); 60 _onChange.add(new TargetChangeEventMock(repository: this));
61 } 61 }
62 62
63 M.Target find(String networkAddress) { 63 M.Target find(String networkAddress) {
64 return null; 64 return const TargetMock();
65 } 65 }
66 66
67 @override 67 @override
68 bool isConnectedVMTarget(M.Target target) { 68 bool isConnectedVMTarget(M.Target target) {
69 return false; 69 return false;
70 } 70 }
71 71
72 TargetRepositoryMock( 72 TargetRepositoryMock(
73 {M.Target current, 73 {M.Target current,
74 Iterable<M.Target> list: const [], 74 Iterable<M.Target> list: const [],
75 TargetRepositoryMockStringCallback add, 75 TargetRepositoryMockStringCallback add,
76 TargetRepositoryMockTargetCallback setCurrent, 76 TargetRepositoryMockTargetCallback setCurrent,
77 TargetRepositoryMockTargetCallback delete}) 77 TargetRepositoryMockTargetCallback delete})
78 : _current = current, 78 : _current = current,
79 _list = list, 79 _list = list,
80 _add = add, 80 _add = add,
81 _setCurrent = setCurrent, 81 _setCurrent = setCurrent,
82 _delete = delete; 82 _delete = delete;
83 } 83 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698