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

Side by Side Diff: tests/standalone/debugger/debug_lib.dart

Issue 12504006: Make IOSink implement StringSink (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed second round of review comments Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('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) 2012, 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 used by debugger wire protocol tests (standalone VM debugging). 5 // Library used by debugger wire protocol tests (standalone VM debugging).
6 6
7 library DartDebugger; 7 library DartDebugger;
8 8
9 import "dart:io"; 9 import "dart:io";
10 import "dart:utf"; 10 import "dart:utf";
11 import "dart:json" as JSON; 11 import "dart:json" as JSON;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 runScript(List entries) { 454 runScript(List entries) {
455 script = new DebugScript(entries); 455 script = new DebugScript(entries);
456 openConnection(); 456 openConnection();
457 } 457 }
458 458
459 // Send a debugger command to the target VM. 459 // Send a debugger command to the target VM.
460 void sendMessage(Map<String,dynamic> msg) { 460 void sendMessage(Map<String,dynamic> msg) {
461 String jsonMsg = JSON.stringify(msg); 461 String jsonMsg = JSON.stringify(msg);
462 if (verboseWire) print("SEND: $jsonMsg"); 462 if (verboseWire) print("SEND: $jsonMsg");
463 socket.addString(jsonMsg); 463 socket.write(jsonMsg);
464 } 464 }
465 465
466 bool get errorsDetected => errors.length > 0; 466 bool get errorsDetected => errors.length > 0;
467 467
468 // Record error message. 468 // Record error message.
469 void error(String s) { 469 void error(String s) {
470 errors.add(s); 470 errors.add(s);
471 } 471 }
472 472
473 void openConnection() { 473 void openConnection() {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 process.exitCode.then((int exitCode) { 532 process.exitCode.then((int exitCode) {
533 Expect.equals(0, exitCode); 533 Expect.equals(0, exitCode);
534 Expect.equals(0, exitCode); 534 Expect.equals(0, exitCode);
535 print("Debug target process exited with exit code $exitCode"); 535 print("Debug target process exited with exit code $exitCode");
536 }); 536 });
537 var debugger = new Debugger(process, debugPort); 537 var debugger = new Debugger(process, debugPort);
538 debugger.runScript(script); 538 debugger.runScript(script);
539 }); 539 });
540 return true; 540 return true;
541 } 541 }
OLDNEW
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698