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

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

Issue 10387082: Fix URL decoding in HTTP library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix Created 8 years, 7 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
« runtime/bin/http_utils.dart ('K') | « tests/standalone/io/http_date_test.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/url_encoding_test.dart
diff --git a/tests/standalone/io/url_encoding_test.dart b/tests/standalone/io/url_encoding_test.dart
index 17b4588856053b2dbef3949d53c48a19c0370ad0..33b131ccd6dcc393c1ab1c76c3e40494159d9a21 100644
--- a/tests/standalone/io/url_encoding_test.dart
+++ b/tests/standalone/io/url_encoding_test.dart
@@ -2,6 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+#import("dart:utf");
+#source("../../../runtime/bin/input_stream.dart");
+#source("../../../runtime/bin/output_stream.dart");
+#source("../../../runtime/bin/chunked_stream.dart");
+#source("../../../runtime/bin/string_stream.dart");
+#source("../../../runtime/bin/stream_util.dart");
+#source("../../../runtime/bin/http.dart");
+#source("../../../runtime/bin/http_impl.dart");
+#source("../../../runtime/bin/http_parser.dart");
#source("../../../runtime/bin/http_utils.dart");
void testParseEncodedString() {
@@ -13,14 +22,17 @@ void testParseEncodedString() {
void testParseQueryString() {
// The query string includes escaped "?"s, "&"s, "%"s and "="s.
// These should not affect the splitting of the string.
- String queryString = '%3F=%3D&foo=bar&%26=%25';
+ String queryString =
+ '%3F=%3D&foo=bar&%26=%25&sqrt2=%E2%88%9A2&name=Franti%C5%A1ek';
Map<String, String> map = _HttpUtils.splitQueryString(queryString);
for (String key in map.getKeys()) {
- Expect.equals(map[key], { '&' : '%',
- 'foo' : 'bar',
- '?' : '='}[key]);
+ Expect.equals(map[key], { '&' : '%',
+ 'foo' : 'bar',
+ '?' : '=',
+ 'sqrt2' : '\u221A2',
+ 'name' : 'Franti\u0161ek'}[key]);
}
- Expect.setEquals(map.getKeys(), ['&', '?', 'foo']);
+ Expect.setEquals(map.getKeys(), ['&', '?', 'foo', 'sqrt2', 'name']);
}
void main() {
« runtime/bin/http_utils.dart ('K') | « tests/standalone/io/http_date_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698