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

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

Issue 469583002: Add support for HttpServer.defaultResponseHeaders to HttpMultiServer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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_multi_server/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a3d9062067bced9da28b8452eccec18c0212a906..0371c8973ef3d856c97d3bd4d58f4e6bf3df2c5c 100644
--- a/pkg/http_multi_server/test/http_multi_server_test.dart
+++ b/pkg/http_multi_server/test/http_multi_server_test.dart
@@ -60,6 +60,28 @@ void main() {
}), completes);
});
+ test("headers.set sets the value for all servers", () {
+ multiServer.defaultResponseHeaders.set(
+ "server", "http_multi_server test");
+
+ multiServer.listen((request) {
+ request.response.write("got request");
+ request.response.close();
+ });
+
+ expect(_get(subServer1).then((response) {
+ expect(response.headers['server'], equals("http_multi_server test"));
+ }), completes);
+
+ expect(_get(subServer2).then((response) {
+ expect(response.headers['server'], equals("http_multi_server test"));
+ }), completes);
+
+ expect(_get(subServer3).then((response) {
+ expect(response.headers['server'], equals("http_multi_server test"));
+ }), completes);
+ });
+
test("connectionsInfo sums the values for all servers", () {
var pendingRequests = 0;
var awaitingResponseCompleter = new Completer();
« no previous file with comments | « pkg/http_multi_server/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698