22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- // @dart = 2.9
6-
75/// Tests that require a fresh context to run, and can interfere with other
86/// tests.
97@TestOn ('vm' )
@@ -26,7 +24,7 @@ WipConnection get tabConnection => context.tabConnection;
2624
2725void main () {
2826 group ('fresh context' , () {
29- VM vm;
27+ late VM vm;
3028 setUpAll (() async {
3129 await context.setUp ();
3230 vm = await service.getVM ();
@@ -48,18 +46,18 @@ void main() {
4846 // Wait for the refresh to propagate through.
4947 final isolateStart =
5048 await stream.firstWhere ((e) => e.kind != EventKind .kIsolateStart);
51- final isolateId = isolateStart.isolate.id;
49+ final isolateId = isolateStart.isolate! .id! ;
5250 final refreshedScriptList = await service.getScripts (isolateId);
53- final refreshedMain = refreshedScriptList.scripts
54- .lastWhere ((each) => each.uri.contains ('main.dart' ));
51+ final refreshedMain = refreshedScriptList.scripts!
52+ .lastWhere ((each) => each.uri! .contains ('main.dart' ));
5553 final bpLine = await context.findBreakpointLine (
5654 'printHelloWorld' , isolateId, refreshedMain);
5755 final bp =
58- await service.addBreakpoint (isolateId, refreshedMain.id, bpLine);
59- final isolate = await service.getIsolate (vm.isolates.first.id);
56+ await service.addBreakpoint (isolateId, refreshedMain.id! , bpLine);
57+ final isolate = await service.getIsolate (vm.isolates! .first.id! );
6058 expect (isolate.breakpoints, [bp]);
6159 expect (bp.id, isNotNull);
62- await service.removeBreakpoint (isolateId, bp.id);
60+ await service.removeBreakpoint (isolateId, bp.id! );
6361 expect (isolate.breakpoints, isEmpty);
6462 });
6563 });
0 commit comments