OLD | NEW |
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:math'); | 5 import 'dart:math'; |
6 | 6 |
7 #source("../../../lib/io/input_stream.dart"); | 7 part "../../../sdk/lib/io/input_stream.dart"; |
8 #source("../../../lib/io/output_stream.dart"); | 8 part "../../../sdk/lib/io/output_stream.dart"; |
9 #source("../../../lib/io/chunked_stream.dart"); | 9 part "../../../sdk/lib/io/chunked_stream.dart"; |
10 #source("../../../lib/io/string_stream.dart"); | 10 part "../../../sdk/lib/io/string_stream.dart"; |
11 #source("../../../lib/io/stream_util.dart"); | 11 part "../../../sdk/lib/io/stream_util.dart"; |
12 #source("../../../lib/io/http.dart"); | 12 part "../../../sdk/lib/io/http.dart"; |
13 #source("../../../lib/io/http_impl.dart"); | 13 part "../../../sdk/lib/io/http_impl.dart"; |
14 #source("../../../lib/io/http_parser.dart"); | 14 part "../../../sdk/lib/io/http_parser.dart"; |
15 #source("../../../lib/io/http_utils.dart"); | 15 part "../../../sdk/lib/io/http_utils.dart"; |
16 | 16 |
17 void testMultiValue() { | 17 void testMultiValue() { |
18 _HttpHeaders headers = new _HttpHeaders(); | 18 _HttpHeaders headers = new _HttpHeaders(); |
19 Expect.isNull(headers[HttpHeaders.PRAGMA]); | 19 Expect.isNull(headers[HttpHeaders.PRAGMA]); |
20 headers.add(HttpHeaders.PRAGMA, "pragma1"); | 20 headers.add(HttpHeaders.PRAGMA, "pragma1"); |
21 Expect.equals(1, headers[HttpHeaders.PRAGMA].length); | 21 Expect.equals(1, headers[HttpHeaders.PRAGMA].length); |
22 Expect.equals(1, headers["pragma"].length); | 22 Expect.equals(1, headers["pragma"].length); |
23 Expect.equals(1, headers["Pragma"].length); | 23 Expect.equals(1, headers["Pragma"].length); |
24 Expect.equals(1, headers["PRAGMA"].length); | 24 Expect.equals(1, headers["PRAGMA"].length); |
25 Expect.equals("pragma1", headers.value(HttpHeaders.PRAGMA)); | 25 Expect.equals("pragma1", headers.value(HttpHeaders.PRAGMA)); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 testIfModifiedSince(); | 402 testIfModifiedSince(); |
403 testHost(); | 403 testHost(); |
404 testEnumeration(); | 404 testEnumeration(); |
405 testHeaderValue(); | 405 testHeaderValue(); |
406 testContentType(); | 406 testContentType(); |
407 testContentTypeCache(); | 407 testContentTypeCache(); |
408 testCookie(); | 408 testCookie(); |
409 testInvalidCookie(); | 409 testInvalidCookie(); |
410 testHeaderLists(); | 410 testHeaderLists(); |
411 } | 411 } |
OLD | NEW |