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

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

Issue 37033002: dart:io | Remove uses of Options class from standalone tests. Mark Options deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove commented lines from standalone.status. Created 7 years, 2 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
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;
11 11
12 void main() { 12 void main(List<String> args) {
13 var args = new Options().arguments;
14 if (args.isEmpty) { 13 if (args.isEmpty) {
15 for (int i = 0; i < NUM_SERVERS; ++i) { 14 for (int i = 0; i < NUM_SERVERS; ++i) {
16 makeServer().then((server) { 15 makeServer().then((server) {
17 runClientProcess(server.port).then((_) => server.close()); 16 runClientProcess(server.port).then((_) => server.close());
18 }); 17 });
19 } 18 }
20 } else if (args[0] == '--client') { 19 } else if (args[0] == '--client') {
21 int port = int.parse(args[1]); 20 int port = int.parse(args[1]);
22 runClient(port); 21 runClient(port);
23 } else { 22 } else {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 62 }
64 }); 63 });
65 } 64 }
66 65
67 runClient(int port) { 66 runClient(int port) {
68 RawSocket.connect(InternetAddress.LOOPBACK_IP_V4, port).then((connection) { 67 RawSocket.connect(InternetAddress.LOOPBACK_IP_V4, port).then((connection) {
69 connection.listen((_) { }, onDone: () => print('SUCCESS')); 68 connection.listen((_) { }, onDone: () => print('SUCCESS'));
70 connection.shutdown(SocketDirection.SEND); 69 connection.shutdown(SocketDirection.SEND);
71 }); 70 });
72 } 71 }
OLDNEW
« no previous file with comments | « tests/standalone/io/process_sync_script.dart ('k') | tests/standalone/io/secure_bad_certificate_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698