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