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

Unified Diff: pkg/http_multi_server/test/http_multi_server_test.dart

Issue 598453003: Add HttpServer:autoCompress option, to disable auto gzip compression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test. Created 6 years, 3 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: pkg/http_multi_server/test/http_multi_server_test.dart
diff --git a/pkg/http_multi_server/test/http_multi_server_test.dart b/pkg/http_multi_server/test/http_multi_server_test.dart
index 0371c8973ef3d856c97d3bd4d58f4e6bf3df2c5c..f74f359634f27f4da804b6657b58b9d19657bbb3 100644
--- a/pkg/http_multi_server/test/http_multi_server_test.dart
+++ b/pkg/http_multi_server/test/http_multi_server_test.dart
@@ -58,6 +58,27 @@ void main() {
expect(_get(subServer3).then((response) {
expect(response.headers['server'], equals("http_multi_server test"));
}), completes);
+ }
+ );
nweiz 2014/09/23 19:34:46 Nit: "});"
Anders Johnsen 2014/09/24 09:33:13 Done.
+ test("autoCompress= sets the value for all servers", () {
nweiz 2014/09/23 19:34:46 Nit: empty line between tests.
Anders Johnsen 2014/09/24 09:33:13 Done.
+ multiServer.autoCompress = true;
+
+ multiServer.listen((request) {
+ request.response.write("got request");
+ request.response.close();
+ });
+
+ expect(_get(subServer1).then((response) {
+ expect(response.headers['content-encoding'], equals("gzip"));
+ }), completes);
+
+ expect(_get(subServer2).then((response) {
+ expect(response.headers['content-encoding'], equals("gzip"));
+ }), completes);
+
+ expect(_get(subServer3).then((response) {
+ expect(response.headers['content-encoding'], equals("gzip"));
+ }), completes);
});
test("headers.set sets the value for all servers", () {

Powered by Google App Engine
This is Rietveld 408576698