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

Unified Diff: tests/standalone/io/http_server_test.dart

Issue 125743002: Add HttpRequest::requestedUri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Provide fall-back host and port. Created 6 years, 11 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
« sdk/lib/io/http.dart ('K') | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_server_test.dart
diff --git a/tests/standalone/io/http_server_test.dart b/tests/standalone/io/http_server_test.dart
index b406f7f58d7a367f58c31ac74d5cdd15c30d9527..13cccf9c83a42eb4e3863b805b22a63079d2144d 100644
--- a/tests/standalone/io/http_server_test.dart
+++ b/tests/standalone/io/http_server_test.dart
@@ -109,8 +109,29 @@ void testHttpServerZoneError() {
}
+void testAbsoluteUri() {
+ asyncStart();
+ HttpServer.bind("127.0.0.1", 0).then((server) {
+ server.listen((request) {
+ Expect.equals("http://localhost:${server.port}/path?a=b#c",
+ request.absoluteUri.toString());
+ request.response.close();
+ });
+ HttpClient client = new HttpClient();
+ client.get("localhost", server.port, "/path?a=b#c")
+ .then((request) =>request.close())
+ .then((response) => response.drain())
+ .then((_) {
+ server.close();
+ asyncEnd();
+ });
+ });
+}
+
+
void main() {
testListenOn();
testHttpServerZone();
testHttpServerZoneError();
+ testAbsoluteUri();
}
« sdk/lib/io/http.dart ('K') | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698