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

Unified Diff: tests/standalone/io/http_date_test.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_date_test.dart
===================================================================
--- tests/standalone/io/http_date_test.dart (revision 13683)
+++ tests/standalone/io/http_date_test.dart (working copy)
@@ -16,18 +16,18 @@
void testParseHttpDate() {
Date date;
- date = new Date(1999, Date.JUN, 11, 18, 46, 53, 0, isUtc: true);
+ date = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
Expect.equals(date, _HttpUtils.parseDate("Fri, 11 Jun 1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Friday, 11-Jun-1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Fri Jun 11 18:46:53 1999"));
- date = new Date(1970, Date.JAN, 1, 0, 0, 0, 0, isUtc: true);
+ date = new Date.utc(1970, Date.JAN, 1, 0, 0, 0, 0);
Expect.equals(date, _HttpUtils.parseDate("Thu, 1 Jan 1970 00:00:00 GMT"));
Expect.equals(date,
_HttpUtils.parseDate("Thursday, 1-Jan-1970 00:00:00 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Thu Jan 1 00:00:00 1970"));
- date = new Date(2012, Date.MAR, 5, 23, 59, 59, 0, isUtc: true);
+ date = new Date.utc(2012, Date.MAR, 5, 23, 59, 59, 0);
Expect.equals(date, _HttpUtils.parseDate("Mon, 5 Mar 2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Monday, 5-Mar-2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Mon Mar 5 23:59:59 2012"));
@@ -43,7 +43,7 @@
String expectedFormatted) {
Date date;
String formatted;
- date = new Date(year, month, day, hours, minutes, seconds, 0, isUtc: true);
+ date = new Date.utc(year, month, day, hours, minutes, seconds, 0);
formatted = _HttpUtils.formatDate(date);
Expect.equals(expectedFormatted, formatted);
Expect.equals(date, _HttpUtils.parseDate(formatted));
@@ -95,8 +95,7 @@
int minutes,
int seconds,
String formatted) {
- Date date = new Date(
- year, month, day, hours, minutes, seconds, 0, isUtc: true);
+ Date date = new Date.utc(year, month, day, hours, minutes, seconds, 0);
Expect.equals(date, _HttpUtils.parseCookieDate(formatted));
}
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698