| 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("../../../runtime/bin/input_stream.dart"); | 7 #source("../../../runtime/bin/input_stream.dart"); |
| 8 #source("../../../runtime/bin/output_stream.dart"); | 8 #source("../../../runtime/bin/output_stream.dart"); |
| 9 #source("../../../runtime/bin/chunked_stream.dart"); | 9 #source("../../../runtime/bin/chunked_stream.dart"); |
| 10 #source("../../../runtime/bin/string_stream.dart"); | 10 #source("../../../runtime/bin/string_stream.dart"); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 if (parameters != null) { | 231 if (parameters != null) { |
| 232 Expect.equals(parameters.length, contentType.parameters.length); | 232 Expect.equals(parameters.length, contentType.parameters.length); |
| 233 parameters.forEach((String name, String value) { | 233 parameters.forEach((String name, String value) { |
| 234 Expect.equals(value, contentType.parameters[name]); | 234 Expect.equals(value, contentType.parameters[name]); |
| 235 }); | 235 }); |
| 236 } else { | 236 } else { |
| 237 Expect.equals(0, contentType.parameters.length); | 237 Expect.equals(0, contentType.parameters.length); |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 | 240 |
| 241 _ContentType contentType; | 241 ContentType contentType; |
| 242 contentType = new _ContentType(); | 242 contentType = new ContentType(); |
| 243 Expect.equals("", contentType.primaryType); | 243 Expect.equals("", contentType.primaryType); |
| 244 Expect.equals("", contentType.subType); | 244 Expect.equals("", contentType.subType); |
| 245 Expect.equals("/", contentType.value); | 245 Expect.equals("/", contentType.value); |
| 246 contentType.value = "text/html"; | 246 contentType.value = "text/html"; |
| 247 Expect.equals("text", contentType.primaryType); | 247 Expect.equals("text", contentType.primaryType); |
| 248 Expect.equals("html", contentType.subType); | 248 Expect.equals("html", contentType.subType); |
| 249 Expect.equals("text/html", contentType.value); | 249 Expect.equals("text/html", contentType.value); |
| 250 | 250 |
| 251 contentType = new _ContentType.fromString("text/html"); | 251 contentType = new _ContentType.fromString("text/html"); |
| 252 check(contentType, "text", "html"); | 252 check(contentType, "text", "html"); |
| (...skipping 149 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 |