OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
5 | 5 |
6 import 'test_helper.dart'; | 6 import 'test_helper.dart'; |
7 import 'dart:developer'; | 7 import 'dart:developer'; |
8 import 'service_test_common.dart'; | 8 import 'service_test_common.dart'; |
9 | 9 |
10 testMain() { | 10 testMain() { |
11 debugger(); // Stop here. | 11 debugger(); // Stop here. |
12 print('1'); | 12 print('1'); |
13 while (true) {} | 13 while (true) { |
| 14 } |
14 } | 15 } |
15 | 16 |
16 var tests = [ | 17 var tests = [ |
17 // Stopped at 'debugger' statement. | 18 // Stopped at 'debugger' statement. |
18 hasStoppedAtBreakpoint, | 19 hasStoppedAtBreakpoint, |
19 // Reload sources and request to pause post reload. The pause request will be | 20 // Reload sources and request to pause post reload. The pause request will be |
20 // ignored because we are already paused at a breakpoint. | 21 // ignored because we are already paused at a breakpoint. |
21 reloadSources(true), | 22 reloadSources(true), |
22 // Ensure that we are still stopped at a breakpoint. | 23 // Ensure that we are still stopped at a breakpoint. |
23 hasStoppedAtBreakpoint, | 24 hasStoppedAtBreakpoint, |
24 // Resume the isolate into the while loop. | 25 // Resume the isolate into the while loop. |
25 resumeIsolate, | 26 resumeIsolate, |
26 // Reload sources and request to pause post reload. The pause request will | 27 // Reload sources and request to pause post reload. The pause request will |
27 // be respected because we are not already paused. | 28 // be respected because we are not already paused. |
28 reloadSources(true), | 29 reloadSources(true), |
29 // Ensure that we are paused post reload request. | 30 // Ensure that we are paused post reload request. |
30 hasStoppedPostRequest, | 31 hasStoppedPostRequest, |
31 // Resume the isolate. | 32 // Resume the isolate. |
32 resumeIsolate, | 33 resumeIsolate, |
33 // Verify that it is running. | 34 // Verify that it is running. |
34 isolateIsRunning, | 35 isolateIsRunning, |
35 // Reload sources and do not request to pause post reload. | 36 // Reload sources and do not request to pause post reload. |
36 reloadSources(false), | 37 reloadSources(false), |
37 // Verify that it is running. | 38 // Verify that it is running. |
38 isolateIsRunning, | 39 isolateIsRunning, |
39 ]; | 40 ]; |
40 | 41 |
41 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 42 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
OLD | NEW |