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

Unified Diff: tools/testing/dart/http_server.dart

Issue 11678011: Adding test for validating that formdata is sent. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « tests/html/form_data_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 0254ad10d107544a5baa283317270634687f064f..8d233a83a0000ed525aa73635bb8b3b26d4d3194 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -42,6 +42,13 @@ void startHttpServer(String host, int port) {
}
};
+ // Echos back the contents of the request as the response data.
+ _httpServer.addRequestHandler((req) => req.path == "/echo", (request, resp) {
+ resp.headers.set("Access-Control-Allow-Origin", "*");
+
+ request.inputStream.pipe(resp.outputStream);
+ });
+
_httpServer.listen(host, port);
}
« no previous file with comments | « tests/html/form_data_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698