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

Side by Side Diff: tests/standalone/io/url_encoding_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:async";
5 import "dart:utf"; 6 import "dart:utf";
6 part "../../../sdk/lib/io/input_stream.dart"; 7 part "../../../sdk/lib/io/input_stream.dart";
7 part "../../../sdk/lib/io/output_stream.dart"; 8 part "../../../sdk/lib/io/output_stream.dart";
8 part "../../../sdk/lib/io/chunked_stream.dart"; 9 part "../../../sdk/lib/io/chunked_stream.dart";
9 part "../../../sdk/lib/io/string_stream.dart"; 10 part "../../../sdk/lib/io/string_stream.dart";
10 part "../../../sdk/lib/io/stream_util.dart"; 11 part "../../../sdk/lib/io/stream_util.dart";
11 part "../../../sdk/lib/io/http.dart"; 12 part "../../../sdk/lib/io/http.dart";
12 part "../../../sdk/lib/io/http_impl.dart"; 13 part "../../../sdk/lib/io/http_impl.dart";
13 part "../../../sdk/lib/io/http_parser.dart"; 14 part "../../../sdk/lib/io/http_parser.dart";
14 part "../../../sdk/lib/io/http_utils.dart"; 15 part "../../../sdk/lib/io/http_utils.dart";
(...skipping 13 matching lines...) Expand all
28 String queryString = 29 String queryString =
29 '%3F=%3D&foo=bar&%26=%25&sqrt2=%E2%88%9A2&name=Franti%C5%A1ek'; 30 '%3F=%3D&foo=bar&%26=%25&sqrt2=%E2%88%9A2&name=Franti%C5%A1ek';
30 Map<String, String> map = _HttpUtils.splitQueryString(queryString); 31 Map<String, String> map = _HttpUtils.splitQueryString(queryString);
31 for (String key in map.keys) { 32 for (String key in map.keys) {
32 Expect.equals(map[key], { '&' : '%', 33 Expect.equals(map[key], { '&' : '%',
33 'foo' : 'bar', 34 'foo' : 'bar',
34 '?' : '=', 35 '?' : '=',
35 'sqrt2' : '\u221A2', 36 'sqrt2' : '\u221A2',
36 'name' : 'Franti\u0161ek'}[key]); 37 'name' : 'Franti\u0161ek'}[key]);
37 } 38 }
38 Expect.setEquals(map.keys, ['&', '?', 'foo', 'sqrt2', 'name']); 39 Expect.setEquals(map.keys.toSet(), ['&', '?', 'foo', 'sqrt2', 'name']);
39 } 40 }
40 41
41 void main() { 42 void main() {
42 testParseEncodedString(); 43 testParseEncodedString();
43 testParseQueryString(); 44 testParseQueryString();
44 } 45 }
OLDNEW
« no previous file with comments | « tests/standalone/io/test_runner_exit_code_test.dart ('k') | tests/standalone/io/web_socket_protocol_processor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698