Chromium Code Reviews| 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"); |
| } |