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

Side by Side Diff: tests/standalone/io/stream_pipe_test.dart

Issue 11336012: Remove public SocketInputStream and SocketOutputStream clases (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « tests/standalone/io/echo_server_stream_test.dart ('k') | tools/ddbg.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) 2012, 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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 #import("dart:io"); 10 #import("dart:io");
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 _sendPort = spawnFunction(startPipeServer); 71 _sendPort = spawnFunction(startPipeServer);
72 initialize(); 72 initialize();
73 } 73 }
74 74
75 void runTest() { 75 void runTest() {
76 76
77 void connectHandler() { 77 void connectHandler() {
78 String srcFileName = 78 String srcFileName =
79 getDataFilename("tests/standalone/io/readline_test1.dat"); 79 getDataFilename("tests/standalone/io/readline_test1.dat");
80 80
81 SocketOutputStream socketOutput = _socket.outputStream; 81 OutputStream socketOutput = _socket.outputStream;
82 InputStream fileInput = new File(srcFileName).openInputStream(); 82 InputStream fileInput = new File(srcFileName).openInputStream();
83 83
84 fileInput.onClosed = () { 84 fileInput.onClosed = () {
85 SocketInputStream socketInput = _socket.inputStream; 85 InputStream socketInput = _socket.inputStream;
86 var tempDir = new Directory('').createTempSync(); 86 var tempDir = new Directory('').createTempSync();
87 var dstFileName = tempDir.path.concat("/readline_test1.dat"); 87 var dstFileName = tempDir.path.concat("/readline_test1.dat");
88 var dstFile = new File(dstFileName); 88 var dstFile = new File(dstFileName);
89 dstFile.createSync(); 89 dstFile.createSync();
90 var fileOutput = dstFile.openOutputStream(); 90 var fileOutput = dstFile.openOutputStream();
91 91
92 socketInput.onClosed = () { 92 socketInput.onClosed = () {
93 // Check that the resulting file is equal to the initial 93 // Check that the resulting file is equal to the initial
94 // file. 94 // file.
95 fileOutput.onClosed = () { 95 fileOutput.onClosed = () {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 srcStream.pipe(dstStream, close: false); 285 srcStream.pipe(dstStream, close: false);
286 } 286 }
287 287
288 288
289 main() { 289 main() {
290 testFileToFilePipe1(); 290 testFileToFilePipe1();
291 testFileToFilePipe2(); 291 testFileToFilePipe2();
292 testFileToFilePipe3(); 292 testFileToFilePipe3();
293 PipeServerGame echoServerGame = new PipeServerGame.start(); 293 PipeServerGame echoServerGame = new PipeServerGame.start();
294 } 294 }
OLDNEW
« no previous file with comments | « tests/standalone/io/echo_server_stream_test.dart ('k') | tools/ddbg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698