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

Side by Side Diff: tests/standalone/io/http_server_close_response_after_error_client.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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 void main() { 8 void main(List<String> arguments) {
9 int port = int.parse(new Options().arguments.first); 9 int port = int.parse(arguments.first);
10 var client = new HttpClient(); 10 var client = new HttpClient();
11 const MAX = 64; 11 const MAX = 64;
12 int count = 0; 12 int count = 0;
13 void run() { 13 void run() {
14 if (count++ == MAX) exit(0); 14 if (count++ == MAX) exit(0);
15 Socket.connect('127.0.0.1', port).then((socket) { 15 Socket.connect('127.0.0.1', port).then((socket) {
16 socket.write("POST / HTTP/1.1\r\n"); 16 socket.write("POST / HTTP/1.1\r\n");
17 socket.write("Content-Length: 10\r\n"); 17 socket.write("Content-Length: 10\r\n");
18 socket.write("\r\n"); 18 socket.write("\r\n");
19 socket.write("LALALA"); 19 socket.write("LALALA");
20 socket.destroy(); 20 socket.destroy();
21 socket.listen(null, onDone: run); 21 socket.listen(null, onDone: run);
22 }); 22 });
23 } 23 }
24 for (int i = 0; i < 4; i++) run(); 24 for (int i = 0; i < 4; i++) run();
25 } 25 }
26
OLDNEW
« no previous file with comments | « tests/standalone/io/http_cross_process_test.dart ('k') | tests/standalone/io/https_bad_certificate_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698