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

Side by Side Diff: runtime/observatory/tests/service/step_into_async_no_await_test.dart

Issue 1726773002: Refactor service tests in preparation of running on sky_shell (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
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 --verbose_debug 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
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';
9
10 const int LINE_A = 20;
8 11
9 // :async_op will not be captured in this function because it never needs to 12 // :async_op will not be captured in this function because it never needs to
10 // reschedule it. 13 // reschedule it.
11 asyncWithoutAwait() async { 14 asyncWithoutAwait() async {
12 print("asyncWithoutAwait"); 15 print("asyncWithoutAwait");
13 } 16 }
14 17
15 testMain() { 18 testMain() {
16 debugger(); 19 debugger();
17 asyncWithoutAwait(); // Line 17 20 asyncWithoutAwait(); // Line A.
18 } 21 }
19 22
20 var tests = [ 23 var tests = [
21 hasStoppedAtBreakpoint, 24 hasStoppedAtBreakpoint,
22 stoppedAtLine(17), 25 stoppedAtLine(LINE_A),
23 (isolate) => isolate.stepInto(), 26 (isolate) => isolate.stepInto(),
24 hasStoppedAtBreakpoint, 27 hasStoppedAtBreakpoint,
25 (isolate) => isolate.getStack(), // Should not crash. 28 (isolate) => isolate.getStack(), // Should not crash.
26 // TODO(rmacnak): stoppedAtLine(12) 29 // TODO(rmacnak): stoppedAtLine(12)
27 // This doesn't happen because asyncWithoutAwait is marked undebuggable. 30 // This doesn't happen because asyncWithoutAwait is marked undebuggable.
28 // Probably needs to change to support async-step-into. 31 // Probably needs to change to support async-step-into.
29 resumeIsolate, 32 resumeIsolate,
30 ]; 33 ];
31 34
32 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 35 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698