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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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 // 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:isolate"; 10 import "dart:isolate";
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 int count = 0; 167 int count = 0;
168 HttpClient httpClient = new HttpClient(); 168 HttpClient httpClient = new HttpClient();
169 void sendRequest() { 169 void sendRequest() {
170 httpClient.post("127.0.0.1", port, "/echo") 170 httpClient.post("127.0.0.1", port, "/echo")
171 .then((request) { 171 .then((request) {
172 if (chunkedEncoding) { 172 if (chunkedEncoding) {
173 request.addString(data.substring(0, 10)); 173 request.addString(data.substring(0, 10));
174 request.addString(data.substring(10, data.length)); 174 request.addString(data.substring(10, data.length));
175 } else { 175 } else {
176 request.contentLength = data.length; 176 request.contentLength = data.length;
177 request.add(data.charCodes); 177 request.add(data.codeUnits);
178 } 178 }
179 return request.close(); 179 return request.close();
180 }) 180 })
181 .then((response) { 181 .then((response) {
182 Expect.equals(HttpStatus.OK, response.statusCode); 182 Expect.equals(HttpStatus.OK, response.statusCode);
183 List<int> body = new List<int>(); 183 List<int> body = new List<int>();
184 response.listen( 184 response.listen(
185 body.addAll, 185 body.addAll,
186 onDone: () { 186 onDone: () {
187 Expect.equals(data, new String.fromCharCodes(body)); 187 Expect.equals(data, new String.fromCharCodes(body));
(...skipping 14 matching lines...) Expand all
202 if (chunkedEncoding) { 202 if (chunkedEncoding) {
203 server.chunkedEncoding(); 203 server.chunkedEncoding();
204 } 204 }
205 server.start(); 205 server.start();
206 } 206 }
207 207
208 void main() { 208 void main() {
209 testRead(true); 209 testRead(true);
210 testRead(false); 210 testRead(false);
211 } 211 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_parser_test.dart ('k') | tests/standalone/io/http_server_early_client_close_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698