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

Unified Diff: tests/corelib/uri_query_test.dart

Issue 16812004: Make some HTTP utility functions public (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One more status file update Created 7 years, 6 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 | « sdk/lib/io/http_utils.dart ('k') | tests/lib/analyzer/analyze_tests.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/uri_query_test.dart
diff --git a/tests/corelib/uri_query_test.dart b/tests/corelib/uri_query_test.dart
index 03c9abaf0d10708b11406705a7f5a8afa1ad245e..bb21f9bc0de206ddd9216c2ece36a9e5b3783eef 100644
--- a/tests/corelib/uri_query_test.dart
+++ b/tests/corelib/uri_query_test.dart
@@ -29,6 +29,9 @@ void testQueryParameters() {
Expect.equals("?$normalizedQuery", uri.toString());
}
if (parameters.containsValue(null)) {
+ var map = new Map.from(parameters);
+ map.forEach((k, v) { if (v == null) map[k] = ""; });
+ Expect.mapEquals(map, uri.queryParameters);
} else {
Expect.mapEquals(parameters, uri.queryParameters);
}
@@ -42,6 +45,13 @@ void testQueryParameters() {
check(uri3);
Expect.equals(uri1, uri3);
Expect.equals(uri2, uri3);
+ if (parameters.containsValue(null)) {
+ var map = new Map.from(parameters);
+ map.forEach((k, v) { if (v == null) map[k] = ""; });
+ Expect.mapEquals(map, Uri.splitQueryString(query));
+ } else {
+ Expect.mapEquals(parameters, Uri.splitQueryString(query));
+ }
}
test("", {});
« no previous file with comments | « sdk/lib/io/http_utils.dart ('k') | tests/lib/analyzer/analyze_tests.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698