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

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

Issue 1299083002: Automagically change the meaning of 'next' to 'async-next' when paused at an async function at awai… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/observatory/tests/service/smart_next_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 library test_helper; 5 library test_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'package:observatory/service_io.dart'; 10 import 'package:observatory/service_io.dart';
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 IsolateTest stoppedAtLine(int line) { 203 IsolateTest stoppedAtLine(int line) {
204 return (Isolate isolate) async { 204 return (Isolate isolate) async {
205 print("Checking we are at line $line"); 205 print("Checking we are at line $line");
206 206
207 ServiceMap stack = await isolate.getStack(); 207 ServiceMap stack = await isolate.getStack();
208 expect(stack.type, equals('Stack')); 208 expect(stack.type, equals('Stack'));
209 expect(stack['frames'].length, greaterThanOrEqualTo(1)); 209 expect(stack['frames'].length, greaterThanOrEqualTo(1));
210 210
211 Frame top = stack['frames'][0]; 211 Frame top = stack['frames'][0];
212 print("We are at $top");
212 Script script = await top.location.script.load(); 213 Script script = await top.location.script.load();
213 expect(script.tokenToLine(top.location.tokenPos), equals(line)); 214 expect(script.tokenToLine(top.location.tokenPos), equals(line));
214 }; 215 };
215 } 216 }
216 217
217 218
218 Future<Isolate> resumeIsolate(Isolate isolate) { 219 Future<Isolate> resumeIsolate(Isolate isolate) {
219 Completer completer = new Completer(); 220 Completer completer = new Completer();
220 isolate.vm.getEventStream(VM.kDebugStream).then((stream) { 221 isolate.vm.getEventStream(VM.kDebugStream).then((stream) {
221 var subscription; 222 var subscription;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 }, onError: (e, st) { 313 }, onError: (e, st) {
313 process.requestExit(); 314 process.requestExit();
314 if (!_isWebSocketDisconnect(e)) { 315 if (!_isWebSocketDisconnect(e)) {
315 print('Unexpected exception in service tests: $e $st'); 316 print('Unexpected exception in service tests: $e $st');
316 throw e; 317 throw e;
317 } 318 }
318 }); 319 });
319 }); 320 });
320 } 321 }
321 } 322 }
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/smart_next_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698