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

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

Issue 10407093: Fix test tests/standalone/io/http_headers_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #source("../../../runtime/bin/input_stream.dart"); 5 #source("../../../runtime/bin/input_stream.dart");
6 #source("../../../runtime/bin/output_stream.dart"); 6 #source("../../../runtime/bin/output_stream.dart");
7 #source("../../../runtime/bin/chunked_stream.dart"); 7 #source("../../../runtime/bin/chunked_stream.dart");
8 #source("../../../runtime/bin/string_stream.dart"); 8 #source("../../../runtime/bin/string_stream.dart");
9 #source("../../../runtime/bin/stream_util.dart"); 9 #source("../../../runtime/bin/stream_util.dart");
10 #source("../../../runtime/bin/http.dart"); 10 #source("../../../runtime/bin/http.dart");
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 Expect.equals("text/html", contentType.value); 225 Expect.equals("text/html", contentType.value);
226 226
227 contentType = new _ContentType.fromString("text/html"); 227 contentType = new _ContentType.fromString("text/html");
228 check(contentType, "text", "html"); 228 check(contentType, "text", "html");
229 Expect.equals("text/html", contentType.toString()); 229 Expect.equals("text/html", contentType.toString());
230 contentType.parameters["charset"] = "utf-8"; 230 contentType.parameters["charset"] = "utf-8";
231 check(contentType, "text", "html", {"charset": "utf-8"}); 231 check(contentType, "text", "html", {"charset": "utf-8"});
232 Expect.equals("text/html; charset=utf-8", contentType.toString()); 232 Expect.equals("text/html; charset=utf-8", contentType.toString());
233 contentType.parameters["xxx"] = "yyy"; 233 contentType.parameters["xxx"] = "yyy";
234 check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"}); 234 check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
235 Expect.equals("text/html; charset=utf-8; xxx=yyy", contentType.toString()); 235 String s = contentType.toString();
236 bool expectedToString = (s == "text/html; charset=utf-8; xxx=yyy" ||
237 s == "text/html; xxx=yyy; charset=utf-8");
238 Expect.isTrue(expectedToString);
236 239
237 contentType = new _ContentType.fromString("text/html"); 240 contentType = new _ContentType.fromString("text/html");
238 check(contentType, "text", "html"); 241 check(contentType, "text", "html");
239 contentType = new _ContentType.fromString(" text/html "); 242 contentType = new _ContentType.fromString(" text/html ");
240 check(contentType, "text", "html"); 243 check(contentType, "text", "html");
241 contentType = new _ContentType.fromString("text/html; charset=utf-8"); 244 contentType = new _ContentType.fromString("text/html; charset=utf-8");
242 check(contentType, "text", "html", {"charset": "utf-8"}); 245 check(contentType, "text", "html", {"charset": "utf-8"});
243 contentType = new _ContentType.fromString( 246 contentType = new _ContentType.fromString(
244 " text/html ; charset = utf-8 "); 247 " text/html ; charset = utf-8 ");
245 check(contentType, "text", "html", {"charset": "utf-8"}); 248 check(contentType, "text", "html", {"charset": "utf-8"});
(...skipping 29 matching lines...) Expand all
275 278
276 main() { 279 main() {
277 testMultiValue(); 280 testMultiValue();
278 testExpires(); 281 testExpires();
279 testHost(); 282 testHost();
280 testEnumeration(); 283 testEnumeration();
281 testHeaderValue(); 284 testHeaderValue();
282 testContentType(); 285 testContentType();
283 testContentTypeCache(); 286 testContentTypeCache();
284 } 287 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698