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

Side by Side Diff: tools/coverage.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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 | Annotate | Revision Log
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 // This test forks a second vm process that runs a dart script as 5 // This test forks a second vm process that runs a dart script as
6 // a debug target, single stepping through the entire program, and 6 // a debug target, single stepping through the entire program, and
7 // recording each breakpoint. At the end, a coverage map of the source 7 // recording each breakpoint. At the end, a coverage map of the source
8 // is printed. 8 // is printed.
9 // 9 //
10 // Usage: dart coverage.dart [--wire] [--verbose] target_script.dart 10 // Usage: dart coverage.dart [--wire] [--verbose] target_script.dart
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 }, 383 },
384 onDone: () { 384 onDone: () {
385 print("Connection closed by coverage target"); 385 print("Connection closed by coverage target");
386 cleanup(); 386 cleanup();
387 }, 387 },
388 onError: (e) { 388 onError: (e) {
389 print("Error '$e' detected in input stream from coverage target"); 389 print("Error '$e' detected in input stream from coverage target");
390 cleanup(); 390 cleanup();
391 }); 391 });
392 }, 392 },
393 onError: (e) { 393 onError: (e, trace) {
394 String msg = "Error while connecting to coverage target: $e"; 394 String msg = "Error while connecting to coverage target: $e";
395 var trace = getAttachedStackTrace(e);
396 if (trace != null) msg += "\nStackTrace: $trace"; 395 if (trace != null) msg += "\nStackTrace: $trace";
397 error(msg); 396 error(msg);
398 cleanup(); 397 cleanup();
399 }); 398 });
400 } 399 }
401 400
402 void cleanup() { 401 void cleanup() {
403 if (cleanupDone) return; 402 if (cleanupDone) return;
404 if (socket != null) { 403 if (socket != null) {
405 socket.close().catchError((error) { 404 socket.close().catchError((error) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 targetOpts.add(str); 536 targetOpts.add(str);
538 break; 537 break;
539 } 538 }
540 } 539 }
541 540
542 Process.start(Platform.executable, targetOpts).then((Process process) { 541 Process.start(Platform.executable, targetOpts).then((Process process) {
543 process.stdin.close(); 542 process.stdin.close();
544 debugger = new Debugger(process); 543 debugger = new Debugger(process);
545 }); 544 });
546 } 545 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_protocol_processor_test.dart ('k') | tools/testing/dart/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698