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

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

Issue 10411057: Deprecate use of timezones. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix code using old api. 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 side-by-side diff with in-line comments
Download patch
« tests/co19/co19-leg.status ('K') | « tests/standalone/io/http_headers_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_test.dart
diff --git a/tests/standalone/io/http_test.dart b/tests/standalone/io/http_test.dart
index 866d58e2e5647fe03bd447a1d4d09caa48c964fa..3a3ed80125cf3bbcbb20f80adc1f4702820498c5 100644
--- a/tests/standalone/io/http_test.dart
+++ b/tests/standalone/io/http_test.dart
@@ -136,9 +136,7 @@ class TestServer extends Isolate {
// Set the "Expires" header using the expires property.
void _expires1Handler(HttpRequest request, HttpResponse response) {
- Date date =
- new Date.withTimeZone(
- 1999, Date.JUN, 11, 18, 46, 53, 0, new TimeZone.utc());
+ Date date = new Date(1999, Date.JUN, 11, 18, 46, 53, 0, isUtc: true);
response.headers.expires = date;
Expect.equals(date, response.headers.expires);
response.outputStream.close();
@@ -147,9 +145,7 @@ class TestServer extends Isolate {
// Set the "Expires" header.
void _expires2Handler(HttpRequest request, HttpResponse response) {
response.headers.set("Expires", "Fri, 11 Jun 1999 18:46:53 GMT");
- Date date =
- new Date.withTimeZone(
- 1999, Date.JUN, 11, 18, 46, 53, 0, new TimeZone.utc());
+ Date date = new Date(1999, Date.JUN, 11, 18, 46, 53, 0, isUtc: true);
Expect.equals(date, response.headers.expires);
response.outputStream.close();
}
@@ -522,10 +518,8 @@ void testExpires() {
Expect.equals(HttpStatus.OK, response.statusCode);
Expect.equals("Fri, 11 Jun 1999 18:46:53 GMT",
response.headers["expires"][0]);
- Expect.equals(
- new Date.withTimeZone(
- 1999, Date.JUN, 11, 18, 46, 53, 0, new TimeZone.utc()),
- response.headers.expires);
+ Expect.equals(new Date(1999, Date.JUN, 11, 18, 46, 53, 0, isUtc: true),
+ response.headers.expires);
responses++;
if (responses == 2) {
httpClient.shutdown();
« tests/co19/co19-leg.status ('K') | « tests/standalone/io/http_headers_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698