OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:io'; | 5 import 'dart:io'; |
6 import 'dart:utf'; | 6 import 'dart:utf'; |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 void testHttpClientResponseBody() { | 10 void testHttpClientResponseBody() { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 test('application/x-www-form-urlencoded', | 249 test('application/x-www-form-urlencoded', |
250 '%E5%B9%B3%3D%E4%BB%AE%E5%90%8D=%E5%B9%B3%E4%BB%AE%E5%90%8D&b' | 250 '%E5%B9%B3%3D%E4%BB%AE%E5%90%8D=%E5%B9%B3%E4%BB%AE%E5%90%8D&b' |
251 '=%E5%B9%B3%E4%BB%AE%E5%90%8D'.codeUnits, | 251 '=%E5%B9%B3%E4%BB%AE%E5%90%8D'.codeUnits, |
252 { 'b' : '平仮名', | 252 { 'b' : '平仮名', |
253 '平=仮名' : '平仮名'}, | 253 '平=仮名' : '平仮名'}, |
254 "form"); | 254 "form"); |
255 | 255 |
256 test('application/x-www-form-urlencoded', | 256 test('application/x-www-form-urlencoded', |
257 'a=%F8+%26%23548%3B'.codeUnits, | 257 'a=%F8+%26%23548%3B'.codeUnits, |
258 { 'a' : '\u{FFFD}Ȥ' }, | 258 { 'a' : '\u{FFFD} Ȥ' }, |
259 "form"); | 259 "form"); |
260 | 260 |
261 test('application/x-www-form-urlencoded', | 261 test('application/x-www-form-urlencoded', |
| 262 'a=%C0%A0'.codeUnits, |
| 263 { 'a' : '\u{FFFD}' }, |
| 264 "form"); |
| 265 |
| 266 test('application/x-www-form-urlencoded', |
| 267 'a=x%A0x'.codeUnits, |
| 268 { 'a' : 'x\u{FFFD}x' }, |
| 269 "form"); |
| 270 |
| 271 test('application/x-www-form-urlencoded', |
| 272 'a=x%C0x'.codeUnits, |
| 273 { 'a' : 'x\u{FFFD}x' }, |
| 274 "form"); |
| 275 |
| 276 test('application/x-www-form-urlencoded', |
262 'a=%C3%B8+%C8%A4'.codeUnits, | 277 'a=%C3%B8+%C8%A4'.codeUnits, |
263 { 'a' : 'ø Ȥ' }, | 278 { 'a' : 'ø Ȥ' }, |
264 "form"); | 279 "form"); |
265 | 280 |
266 test('application/x-www-form-urlencoded', | 281 test('application/x-www-form-urlencoded', |
267 'a=%F8+%26%23548%3B'.codeUnits, | 282 'a=%F8+%26%23548%3B'.codeUnits, |
268 { 'a' : 'ø Ȥ' }, | 283 { 'a' : 'ø Ȥ' }, |
269 "form", | 284 "form", |
270 defaultEncoding: Encoding.ISO_8859_1); | 285 defaultEncoding: Encoding.ISO_8859_1); |
271 | 286 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 test('application/x-www-form-urlencoded', | 331 test('application/x-www-form-urlencoded', |
317 'name=%C8%A4%C8%A4'.codeUnits, | 332 'name=%C8%A4%C8%A4'.codeUnits, |
318 { 'name' : 'ȤȤ' }, | 333 { 'name' : 'ȤȤ' }, |
319 "form"); | 334 "form"); |
320 } | 335 } |
321 | 336 |
322 void main() { | 337 void main() { |
323 testHttpClientResponseBody(); | 338 testHttpClientResponseBody(); |
324 testHttpServerRequestBody(); | 339 testHttpServerRequestBody(); |
325 } | 340 } |
OLD | NEW |