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

Side by Side Diff: test/isolate_test.dart

Issue 1929063002: pkg/vm_service_client: add getSourceReport to VMServiceReference (Closed) Base URL: https://github.com/dart-lang/vm_service_client.git@master
Patch Set: changelog oops Created 4 years, 7 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 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:async/async.dart'; 7 import 'package:async/async.dart';
8 import 'package:json_rpc_2/json_rpc_2.dart' as rpc; 8 import 'package:json_rpc_2/json_rpc_2.dart' as rpc;
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 import 'package:vm_service_client/vm_service_client.dart'; 10 import 'package:vm_service_client/vm_service_client.dart';
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 inner(); 369 inner();
370 print("after inner"); // line 10 370 print("after inner"); // line 10
371 } 371 }
372 """, main: r""" 372 """, main: r"""
373 outer(); 373 outer();
374 print("after outer"); // line 18 374 print("after outer"); // line 18
375 """); 375 """);
376 376
377 isolate = (await client.getVM()).isolates.first; 377 isolate = (await client.getVM()).isolates.first;
378 await isolate.waitUntilPaused(); 378 await isolate.waitUntilPaused();
379 stdout = new StreamQueue(lines.bind(isolate.stdout)); 379 stdout = new StreamQueue(isolate.stdout.transform(lines));
380 }); 380 });
381 381
382 test("resumes normal execution by default", () async { 382 test("resumes normal execution by default", () async {
383 expect(stdout.next, completion(equals("in inner"))); 383 expect(stdout.next, completion(equals("in inner")));
384 expect(stdout.next, completion(equals("after inner"))); 384 expect(stdout.next, completion(equals("after inner")));
385 expect(stdout.next, completion(equals("after outer"))); 385 expect(stdout.next, completion(equals("after outer")));
386 386
387 isolate.resume(); 387 isolate.resume();
388 }); 388 });
389 389
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 var vm = await client.getVM(); 541 var vm = await client.getVM();
542 var main = vm.isolates.first; 542 var main = vm.isolates.first;
543 543
544 var otherFuture = client.onIsolateRunnable.first; 544 var otherFuture = client.onIsolateRunnable.first;
545 await main.resume(); 545 await main.resume();
546 var other = await otherFuture; 546 var other = await otherFuture;
547 await other.resume(); 547 await other.resume();
548 548
549 return [main, other]; 549 return [main, other];
550 } 550 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698