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

Side by Side Diff: tests/standalone/io/http_server_early_client_close_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 // 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 "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 }); 111 });
112 } 112 }
113 } 113 }
114 runTest(tests.iterator); 114 runTest(tests.iterator);
115 } 115 }
116 116
117 testEarlyClose2() { 117 testEarlyClose2() {
118 HttpServer.bind("127.0.0.1", 0).then((server) { 118 HttpServer.bind("127.0.0.1", 0).then((server) {
119 server.listen( 119 server.listen(
120 (request) { 120 (request) {
121 String name = Platform.script.toFilePath(); 121 String name = Platform.script;
122 new File(name).openRead().pipe(request.response) 122 new File(name).openRead().pipe(request.response)
123 .catchError((e) { /* ignore */ }); 123 .catchError((e) { /* ignore */ });
124 }); 124 });
125 125
126 var count = 0; 126 var count = 0;
127 makeRequest() { 127 makeRequest() {
128 Socket.connect("127.0.0.1", server.port).then((socket) { 128 Socket.connect("127.0.0.1", server.port).then((socket) {
129 var data = "GET / HTTP/1.1\r\nContent-Length: 0\r\n\r\n"; 129 var data = "GET / HTTP/1.1\r\nContent-Length: 0\r\n\r\n";
130 socket.write(data); 130 socket.write(data);
131 socket.close(); 131 socket.close();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 socket.done.catchError((_) {}); 166 socket.done.catchError((_) {});
167 }); 167 });
168 }); 168 });
169 } 169 }
170 170
171 void main() { 171 void main() {
172 testEarlyClose1(); 172 testEarlyClose1();
173 testEarlyClose2(); 173 testEarlyClose2();
174 testEarlyClose3(); 174 testEarlyClose3();
175 } 175 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_server_early_client_close2_test.dart ('k') | tests/standalone/io/http_server_response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698