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

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

Issue 2935873002: Revert "Address additional analysis issues in the observatory codebase." (Closed)
Patch Set: Created 3 years, 6 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 --asyn c_debugger 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug --asyn c_debugger
5 5
6 import 'dart:developer'; 6 import 'dart:developer';
7 import 'dart:io'; 7 import 'package:observatory/models.dart' as M;
8 8 import 'package:observatory/service_io.dart';
9 import 'package:unittest/unittest.dart';
9 import 'service_test_common.dart'; 10 import 'service_test_common.dart';
10 import 'test_helper.dart'; 11 import 'test_helper.dart';
11 12
13 const LINE_A = 20;
14 const LINE_B = 21;
15 const LINE_C = 26;
16 const LINE_D = 27;
17 const LINE_E = 28;
18
12 helper() async { 19 helper() async {
13 print('helper'); // LINE_A. 20 print('helper'); // LINE_A.
14 return null; // LINE_B. 21 return null; // LINE_B.
15 } 22 }
16 23
17 testMain() async { 24 testMain() async {
18 debugger(); 25 debugger();
19 print('mmmmm'); // LINE_C. 26 print('mmmmm'); // LINE_C.
20 await helper(); // LINE_D. 27 await helper(); // LINE_D.
21 print('z'); // LINE_E. 28 print('z'); // LINE_E.
22 } 29 }
23 30
24 final ScriptLineParser lineParser = new ScriptLineParser(Platform.script);
25
26 var tests = [ 31 var tests = [
27 hasStoppedAtBreakpoint, 32 hasStoppedAtBreakpoint,
28 stoppedAtLine(lineParser.lineFor('LINE_C')), 33 stoppedAtLine(LINE_C),
29 stepOver, // print. 34 stepOver, // print.
30 hasStoppedAtBreakpoint, 35 hasStoppedAtBreakpoint,
31 stoppedAtLine(lineParser.lineFor('LINE_D')), 36 stoppedAtLine(LINE_D),
32 stepInto, 37 stepInto,
33 hasStoppedAtBreakpoint, 38 hasStoppedAtBreakpoint,
34 stoppedAtLine(lineParser.lineFor('LINE_A')), 39 stoppedAtLine(LINE_A),
35 stepOver, // print. 40 stepOver, // print.
36 hasStoppedAtBreakpoint, 41 hasStoppedAtBreakpoint,
37 stoppedAtLine(lineParser.lineFor('LINE_B')), // return null. 42 stoppedAtLine(LINE_B), // return null.
38 stepInto, // exit helper via a single step. 43 stepInto, // exit helper via a single step.
39 hasStoppedAtBreakpoint, 44 hasStoppedAtBreakpoint,
40 stoppedAtLine(lineParser.lineFor('LINE_E')), // arrive after the await. 45 stoppedAtLine(LINE_E), // arrive after the await.
41 resumeIsolate 46 resumeIsolate
42 ]; 47 ];
43 48
44 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 49 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698