| 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:math'; | 7 import 'dart:math'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 part '../../../sdk/lib/io/common.dart'; | 10 part '../../../sdk/lib/io/common.dart'; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 test("ABC", "DEF"); | 407 test("ABC", "DEF"); |
| 408 test("Abc", "Def"); | 408 test("Abc", "Def"); |
| 409 test("SID", "sJdkjKSJD12343kjKj78"); | 409 test("SID", "sJdkjKSJD12343kjKj78"); |
| 410 } | 410 } |
| 411 | 411 |
| 412 void testInvalidCookie() { | 412 void testInvalidCookie() { |
| 413 Expect.throws(() => new _Cookie.fromSetCookieValue("")); | 413 Expect.throws(() => new _Cookie.fromSetCookieValue("")); |
| 414 Expect.throws(() => new _Cookie.fromSetCookieValue("=")); | 414 Expect.throws(() => new _Cookie.fromSetCookieValue("=")); |
| 415 Expect.throws(() => new _Cookie.fromSetCookieValue("=xxx")); | 415 Expect.throws(() => new _Cookie.fromSetCookieValue("=xxx")); |
| 416 Expect.throws(() => new _Cookie.fromSetCookieValue("xxx")); | 416 Expect.throws(() => new _Cookie.fromSetCookieValue("xxx")); |
| 417 Expect.throws(() => new _Cookie.fromSetCookieValue("xxx=yyy; expires=12 jan 20
13")); | 417 Expect.throws(() => new _Cookie.fromSetCookieValue( |
| 418 "xxx=yyy; expires=12 jan 2013")); |
| 418 } | 419 } |
| 419 | 420 |
| 420 void testHeaderLists() { | 421 void testHeaderLists() { |
| 421 HttpHeaders.GENERAL_HEADERS.forEach((x) => null); | 422 HttpHeaders.GENERAL_HEADERS.forEach((x) => null); |
| 422 HttpHeaders.ENTITY_HEADERS.forEach((x) => null); | 423 HttpHeaders.ENTITY_HEADERS.forEach((x) => null); |
| 423 HttpHeaders.RESPONSE_HEADERS.forEach((x) => null); | 424 HttpHeaders.RESPONSE_HEADERS.forEach((x) => null); |
| 424 HttpHeaders.REQUEST_HEADERS.forEach((x) => null); | 425 HttpHeaders.REQUEST_HEADERS.forEach((x) => null); |
| 425 } | 426 } |
| 426 | 427 |
| 427 main() { | 428 main() { |
| 428 testMultiValue(); | 429 testMultiValue(); |
| 429 testDate(); | 430 testDate(); |
| 430 testExpires(); | 431 testExpires(); |
| 431 testIfModifiedSince(); | 432 testIfModifiedSince(); |
| 432 testHost(); | 433 testHost(); |
| 433 testEnumeration(); | 434 testEnumeration(); |
| 434 testHeaderValue(); | 435 testHeaderValue(); |
| 435 testContentType(); | 436 testContentType(); |
| 436 testContentTypeCache(); | 437 testContentTypeCache(); |
| 437 testCookie(); | 438 testCookie(); |
| 438 testInvalidCookie(); | 439 testInvalidCookie(); |
| 439 testHeaderLists(); | 440 testHeaderLists(); |
| 440 } | 441 } |
| OLD | NEW |