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

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

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 7 years, 6 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 | « tests/standalone/io/http_parser_test.dart ('k') | tests/standalone/io/io_sink_test.dart » ('j') | 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 .then((response) { 95 .then((response) {
96 request.response.addStream(new File(new Options().script).openRead()) 96 request.response.addStream(new File(new Options().script).openRead())
97 .then((response) { 97 .then((response) {
98 response.close(); 98 response.close();
99 response.done.then((_) => server.close()); 99 response.done.then((_) => server.close());
100 }); 100 });
101 }); 101 });
102 }, bytes: bytes * 2); 102 }, bytes: bytes * 2);
103 103
104 testServerRequest((server, request) { 104 testServerRequest((server, request) {
105 var controller = new StreamController(); 105 var controller = new StreamController(sync: true);
106 request.response.addStream(controller.stream) 106 request.response.addStream(controller.stream)
107 .then((response) { 107 .then((response) {
108 response.close(); 108 response.close();
109 response.done.then((_) => server.close()); 109 response.done.then((_) => server.close());
110 }); 110 });
111 controller.close(); 111 controller.close();
112 }, bytes: 0); 112 }, bytes: 0);
113 113
114 testServerRequest((server, request) { 114 testServerRequest((server, request) {
115 request.response.addStream(new File("__not_exitsing_file_").openRead()) 115 request.response.addStream(new File("__not_exitsing_file_").openRead())
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 void main() { 274 void main() {
275 testResponseDone(); 275 testResponseDone();
276 testResponseAddStream(); 276 testResponseAddStream();
277 testResponseAddStreamClosed(); 277 testResponseAddStreamClosed();
278 testResponseAddClosed(); 278 testResponseAddClosed();
279 testBadResponseAdd(); 279 testBadResponseAdd();
280 testBadResponseClose(); 280 testBadResponseClose();
281 testIgnoreRequestData(); 281 testIgnoreRequestData();
282 } 282 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_parser_test.dart ('k') | tests/standalone/io/io_sink_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698