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

Unified Diff: pkg/http_server/test/http_body_test.dart

Issue 31813002: Expose the HttpRequest object in HttpRequestBody, making all request properties available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « pkg/http_server/lib/src/http_body_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_server/test/http_body_test.dart
diff --git a/pkg/http_server/test/http_body_test.dart b/pkg/http_server/test/http_body_test.dart
index 150f1e578b36283848c989a57ffcd25ba6d67cbd..6c9efefafa9e64492cba1510bf162115c6f27dc6 100644
--- a/pkg/http_server/test/http_body_test.dart
+++ b/pkg/http_server/test/http_body_test.dart
@@ -94,22 +94,24 @@ void testHttpServerRequestBody() {
expect(body.type, equals(type));
switch (type) {
case "text":
- expect(body.contentType.mimeType, equals("text/plain"));
+ expect(body.request.headers.contentType.mimeType,
+ equals("text/plain"));
expect(body.body, equals(expectedBody));
break;
case "json":
- expect(body.contentType.mimeType, equals("application/json"));
+ expect(body.request.headers.contentType.mimeType,
+ equals("application/json"));
expect(body.body, equals(expectedBody));
break;
case "binary":
- expect(body.contentType, isNull);
+ expect(body.request.headers.contentType, isNull);
expect(body.body, equals(expectedBody));
break;
case "form":
- var mimeType = body.contentType.mimeType;
+ var mimeType = body.request.headers.contentType.mimeType;
expect(mimeType,
anyOf(equals('multipart/form-data'),
equals('application/x-www-form-urlencoded')));
@@ -134,7 +136,7 @@ void testHttpServerRequestBody() {
default:
throw "bad body type";
}
- body.response.close();
+ body.request.response.close();
}, onError: (error) {
if (!shouldFail) throw error;
});
« no previous file with comments | « pkg/http_server/lib/src/http_body_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698