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

Unified Diff: sdk/lib/_internal/pub/test/serve/utils.dart

Issue 131233011: Set the correct mime types for assets served via pub serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/uses_appropriate_mime_types_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/serve/utils.dart
diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart
index 039480307b309910d7877d216129c87859b8c2b6..6ae1e1ffb66644f018f076f1fd827fb0cd52a6b3 100644
--- a/sdk/lib/_internal/pub/test/serve/utils.dart
+++ b/sdk/lib/_internal/pub/test/serve/utils.dart
@@ -169,10 +169,12 @@ void endPubServe() {
/// verifies that it responds with a body that matches [expectation].
///
/// [expectation] may either be a [Matcher] or a string to match an exact body.
-void requestShouldSucceed(String urlPath, expectation) {
+/// [headers] may be either a [Matcher] or a map to match an exact headers map.
+void requestShouldSucceed(String urlPath, expectation, {headers}) {
schedule(() {
return http.get("http://127.0.0.1:$_port/$urlPath").then((response) {
- expect(response.body, expectation);
+ if (expectation != null) expect(response.body, expectation);
+ if (headers != null) expect(response.headers, headers);
});
}, "request $urlPath");
}
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/uses_appropriate_mime_types_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698