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

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: 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
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..fafc45db6a6613d872e839e933eb5c4f56426ca8 100644
--- a/sdk/lib/_internal/pub/test/serve/utils.dart
+++ b/sdk/lib/_internal/pub/test/serve/utils.dart
@@ -169,10 +169,11 @@ 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.
Bob Nystrom 2014/02/11 19:11:14 Doc what types header can be.
nweiz 2014/02/11 21:45:48 Done.
-void requestShouldSucceed(String urlPath, expectation) {
+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");
}

Powered by Google App Engine
This is Rietveld 408576698