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

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

Issue 1699153002: Add step OverAwait to service protocol (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 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'test_helper.dart'; 7 import 'test_helper.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:developer'; 9 import 'dart:developer';
10 10
(...skipping 30 matching lines...) Expand all
41 }); 41 });
42 }); 42 });
43 isolate.stepOver(); 43 isolate.stepOver();
44 return completer.future; 44 return completer.future;
45 } 45 }
46 46
47 smartNext(Isolate isolate) async { 47 smartNext(Isolate isolate) async {
48 if (isolate.pauseEvent.atAsyncJump) { 48 if (isolate.pauseEvent.atAsyncJump) {
49 print("next-async"); 49 print("next-async");
50 List asyncStepFutures = await isolate.asyncStepOver(); 50 List asyncStepFutures = await isolate.asyncStepOver();
51 return asyncStepFutures[Isolate.kSecondResume]; 51 return asyncStepFutures[Isolate.kTestFuture];
52 } else { 52 } else {
53 print("next-sync"); 53 print("next-sync");
54 return stepOverAwaitingResume(isolate); 54 return stepOverAwaitingResume(isolate);
55 } 55 }
56 } 56 }
57 57
58 var tests = [ 58 var tests = [
59 hasStoppedAtBreakpoint, stoppedAtLine(16), // foo() 59 hasStoppedAtBreakpoint, stoppedAtLine(16), // foo()
60 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await 60 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await
61 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar() 61 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar()
62 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar() 62 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar()
63 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo() 63 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo()
64 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await 64 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await
65 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo() 65 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo()
66 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await 66 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await
67 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar() 67 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar()
68 resumeIsolate, 68 resumeIsolate,
69 ]; 69 ];
70 70
71 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 71 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698