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

Unified Diff: tests/standalone/io/http_server_response_test.dart

Issue 14113008: Add tests for IOSink.done call effect on HttpClientRequest/HttpResponse (should be none). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_server_response_test.dart
diff --git a/tests/standalone/io/http_server_response_test.dart b/tests/standalone/io/http_server_response_test.dart
index 78b7e5da214677c37422129d6fbda47ce47f7937..c04f2c225581124143e0b2cc740aa6a87bd23d88 100644
--- a/tests/standalone/io/http_server_response_test.dart
+++ b/tests/standalone/io/http_server_response_test.dart
@@ -50,6 +50,21 @@ void testResponseDone() {
server.close();
});
});
+
+ testServerRequest((server, request) {
+ new File("__not_exitsing_file_").openRead().pipe(request.response)
+ .catchError((e) {
+ server.close();
+ });
+ });
+
+ testServerRequest((server, request) {
+ request.response.done.then((_) {
+ server.close();
+ });
+ request.response.contentLength = 0;
+ request.response.close();
+ });
}
void testResponseAddStream() {
@@ -83,6 +98,20 @@ void testResponseAddStream() {
});
controller.close();
}, bytes: 0);
+
+ testServerRequest((server, request) {
+ request.response.addStream(new File("__not_exitsing_file_").openRead())
+ .catchError((e) {
+ server.close();
+ });
+ });
+
+ testServerRequest((server, request) {
+ new File("__not_exitsing_file_").openRead().pipe(request.response)
+ .catchError((e) {
+ server.close();
+ });
+ });
}
void testBadResponseAdd() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698