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

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

Issue 120163006: Fix HttpResponse::writeCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 value += 'a'; 281 value += 'a';
282 } 282 }
283 request.response.headers.set('name', value); 283 request.response.headers.set('name', value);
284 request.response.close().catchError((error) { 284 request.response.close().catchError((error) {
285 server.close(); 285 server.close();
286 }, test: (e) => e is HttpException); 286 }, test: (e) => e is HttpException);
287 }); 287 });
288 } 288 }
289 289
290 290
291 void testWriteCharCode() {
292 testServerRequest((server, request) {
293 // Test that default is latin-1 (only 2 bytes).
294 request.response.writeCharCode(0xFF);
295 request.response.writeCharCode(0xFF);
296 request.response.close().then((_) {
297 server.close();
298 });
299 }, bytes: 2);
300 }
301
302
291 void main() { 303 void main() {
292 testResponseDone(); 304 testResponseDone();
293 testResponseAddStream(); 305 testResponseAddStream();
294 testResponseAddStreamClosed(); 306 testResponseAddStreamClosed();
295 testResponseAddClosed(); 307 testResponseAddClosed();
296 testBadResponseAdd(); 308 testBadResponseAdd();
297 testBadResponseClose(); 309 testBadResponseClose();
298 testIgnoreRequestData(); 310 testIgnoreRequestData();
299 testBadHeaders(); 311 testBadHeaders();
312 testWriteCharCode();
300 } 313 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698