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

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

Issue 274243002: http_date: produce leading zero on day component (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « tests/standalone/io/http_date_test.dart ('k') | 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) 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 library dart.io; 5 library dart.io;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:collection"; 9 import "dart:collection";
10 import "dart:convert"; 10 import "dart:convert";
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 var c = new _Cookie.fromSetCookieValue(s); 362 var c = new _Cookie.fromSetCookieValue(s);
363 checkCookiesEquals(cookie, c); 363 checkCookiesEquals(cookie, c);
364 } 364 }
365 365
366 Cookie cookie; 366 Cookie cookie;
367 cookie = new Cookie(name, value); 367 cookie = new Cookie(name, value);
368 Expect.equals("$name=$value", cookie.toString()); 368 Expect.equals("$name=$value", cookie.toString());
369 DateTime date = new DateTime.utc(2014, DateTime.JANUARY, 5, 23, 59, 59, 0); 369 DateTime date = new DateTime.utc(2014, DateTime.JANUARY, 5, 23, 59, 59, 0);
370 cookie.expires = date; 370 cookie.expires = date;
371 checkCookie(cookie, "$name=$value" 371 checkCookie(cookie, "$name=$value"
372 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT"); 372 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT");
373 cookie.maxAge = 567; 373 cookie.maxAge = 567;
374 checkCookie(cookie, "$name=$value" 374 checkCookie(cookie, "$name=$value"
375 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT" 375 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT"
376 "; Max-Age=567"); 376 "; Max-Age=567");
377 cookie.domain = "example.com"; 377 cookie.domain = "example.com";
378 checkCookie(cookie, "$name=$value" 378 checkCookie(cookie, "$name=$value"
379 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT" 379 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT"
380 "; Max-Age=567" 380 "; Max-Age=567"
381 "; Domain=example.com"); 381 "; Domain=example.com");
382 cookie.path = "/xxx"; 382 cookie.path = "/xxx";
383 checkCookie(cookie, "$name=$value" 383 checkCookie(cookie, "$name=$value"
384 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT" 384 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT"
385 "; Max-Age=567" 385 "; Max-Age=567"
386 "; Domain=example.com" 386 "; Domain=example.com"
387 "; Path=/xxx"); 387 "; Path=/xxx");
388 cookie.secure = true; 388 cookie.secure = true;
389 checkCookie(cookie, "$name=$value" 389 checkCookie(cookie, "$name=$value"
390 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT" 390 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT"
391 "; Max-Age=567" 391 "; Max-Age=567"
392 "; Domain=example.com" 392 "; Domain=example.com"
393 "; Path=/xxx" 393 "; Path=/xxx"
394 "; Secure"); 394 "; Secure");
395 cookie.httpOnly = true; 395 cookie.httpOnly = true;
396 checkCookie(cookie, "$name=$value" 396 checkCookie(cookie, "$name=$value"
397 "; Expires=Sun, 5 Jan 2014 23:59:59 GMT" 397 "; Expires=Sun, 05 Jan 2014 23:59:59 GMT"
398 "; Max-Age=567" 398 "; Max-Age=567"
399 "; Domain=example.com" 399 "; Domain=example.com"
400 "; Path=/xxx" 400 "; Path=/xxx"
401 "; Secure" 401 "; Secure"
402 "; HttpOnly"); 402 "; HttpOnly");
403 cookie.expires = null; 403 cookie.expires = null;
404 checkCookie(cookie, "$name=$value" 404 checkCookie(cookie, "$name=$value"
405 "; Max-Age=567" 405 "; Max-Age=567"
406 "; Domain=example.com" 406 "; Domain=example.com"
407 "; Path=/xxx" 407 "; Path=/xxx"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 testIfModifiedSince(); 468 testIfModifiedSince();
469 testHost(); 469 testHost();
470 testEnumeration(); 470 testEnumeration();
471 testHeaderValue(); 471 testHeaderValue();
472 testContentType(); 472 testContentType();
473 testContentTypeCache(); 473 testContentTypeCache();
474 testCookie(); 474 testCookie();
475 testInvalidCookie(); 475 testInvalidCookie();
476 testHeaderLists(); 476 testHeaderLists();
477 } 477 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_date_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698