Skip to content

Commit d5757cb

Browse files
committed
fix: auto-select test_suite isolate as main
1 parent f6199b9 commit d5757cb

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

packages/devtools_app/lib/src/framework/observer/_memory_web.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ extension type _UserAgentSpecificMemoryBreakdownAttributionElement._(JSObject _)
6565
@JS()
6666
extension type _UserAgentSpecificMemoryBreakdownAttributionContainerElement._(
6767
JSObject _
68-
) implements JSObject {
68+
)
69+
implements JSObject {
6970
external String get id;
7071

7172
external String get url;

packages/devtools_app_shared/test/service/isolate_manager_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import 'package:vm_service/vm_service.dart';
1010

1111
/// Minimal fake VmService for IsolateManager tests.
1212
class _FakeVmService extends Fake implements VmService {
13+
_FakeVmService(this.isolates);
14+
1315
/// Map of isolate id -> Isolate to return from getIsolate().
1416
final Map<String, Isolate> isolates;
1517

1618
final _isolateEventController = StreamController<Event>.broadcast();
1719

18-
_FakeVmService(this.isolates);
19-
2020
@override
2121
Stream<Event> get onIsolateEvent => _isolateEventController.stream;
2222

@@ -53,6 +53,7 @@ class _FakeVmService extends Fake implements VmService {
5353
await Future<void>.delayed(Duration.zero);
5454
}
5555

56+
@override
5657
Future<void> dispose() async {
5758
await _isolateEventController.close();
5859
}
@@ -94,7 +95,7 @@ void main() {
9495
tearDown(() {
9596
manager.handleVmServiceClosed();
9697
for (final fakeService in fakeServices) {
97-
fakeService.dispose();
98+
unawaited(fakeService.dispose());
9899
}
99100
fakeServices.clear();
100101
});
@@ -132,8 +133,7 @@ void main() {
132133
expect(
133134
manager.mainIsolate.value?.name,
134135
equals('test_suite:file:///tmp/dart_test.kernel.dill'),
135-
reason:
136-
'Main isolate should also resolve to the test_suite isolate',
136+
reason: 'Main isolate should also resolve to the test_suite isolate',
137137
);
138138
},
139139
);
@@ -204,8 +204,7 @@ void main() {
204204
expect(
205205
manager.selectedIsolate.value?.name,
206206
equals('isolate-2'),
207-
reason:
208-
'Should choose user test isolate using root library metadata',
207+
reason: 'Should choose user test isolate using root library metadata',
209208
);
210209
expect(
211210
manager.mainIsolate.value?.name,
@@ -240,7 +239,8 @@ void main() {
240239
expect(
241240
manager.selectedIsolate.value?.name,
242241
equals('test_suite:file:///tmp/dart_test.kernel.dill'),
243-
reason: 'Should switch selection to test_suite isolate once it starts',
242+
reason:
243+
'Should switch selection to test_suite isolate once it starts',
244244
);
245245
expect(
246246
manager.mainIsolate.value?.name,

0 commit comments

Comments
 (0)