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

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

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 const int NUM_SERVERS = 10; 10 const int NUM_SERVERS = 10;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 }); 43 });
44 }); 44 });
45 return server; 45 return server;
46 }); 46 });
47 } 47 }
48 48
49 Future runClientProcess(int port) { 49 Future runClientProcess(int port) {
50 return Process.run(Platform.executable, 50 return Process.run(Platform.executable,
51 []..addAll(Platform.executableArguments) 51 []..addAll(Platform.executableArguments)
52 ..add(Platform.script.toFilePath()) 52 ..add(Platform.script)
53 ..add('--client') 53 ..add('--client')
54 ..add(port.toString())).then((ProcessResult result) { 54 ..add(port.toString())).then((ProcessResult result) {
55 if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) { 55 if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
56 print("Client failed, exit code ${result.exitCode}"); 56 print("Client failed, exit code ${result.exitCode}");
57 print(" stdout:"); 57 print(" stdout:");
58 print(result.stdout); 58 print(result.stdout);
59 print(" stderr:"); 59 print(" stderr:");
60 print(result.stderr); 60 print(result.stderr);
61 Expect.fail('Client subprocess exit code: ${result.exitCode}'); 61 Expect.fail('Client subprocess exit code: ${result.exitCode}');
62 } 62 }
63 }); 63 });
64 } 64 }
65 65
66 runClient(int port) { 66 runClient(int port) {
67 RawSocket.connect(InternetAddress.LOOPBACK_IP_V4, port).then((connection) { 67 RawSocket.connect(InternetAddress.LOOPBACK_IP_V4, port).then((connection) {
68 connection.listen((_) { }, onDone: () => print('SUCCESS')); 68 connection.listen((_) { }, onDone: () => print('SUCCESS'));
69 connection.shutdown(SocketDirection.SEND); 69 connection.shutdown(SocketDirection.SEND);
70 }); 70 });
71 } 71 }
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_secure_socket_test.dart ('k') | tests/standalone/io/regress_7191_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698