Reviewed by Darin.
authorkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2006 20:39:34 +0000 (20:39 +0000)
committerkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2006 20:39:34 +0000 (20:39 +0000)
        These test DST behavior on the cusp of a change (i.e. spring forward, fall back)

        * fast/js/date-DST-time-cusps-expected.txt: Added.
        * fast/js/date-DST-time-cusps.html: Added.
        * fast/js/resources/date-DST-time-cusps.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/js/date-DST-time-cusps-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/date-DST-time-cusps.html [new file with mode: 0644]
LayoutTests/fast/js/resources/date-DST-time-cusps.js [new file with mode: 0644]

index d8d90bb95b223e3a9a1716c0324af4e84f5f5885..ad14c7c549ee14f87ff0cfec5be7b1c4a8e6c8ee 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-11  Kevin McCullough  <KMcCullough@apple.com>
+
+        Reviewed by Darin.
+
+        These test DST behavior on the cusp of a change (i.e. spring forward, fall back)
+
+        * fast/js/date-DST-time-cusps-expected.txt: Added.
+        * fast/js/date-DST-time-cusps.html: Added.
+        * fast/js/resources/date-DST-time-cusps.js: Added.
+
 2006-10-11  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Brady.
diff --git a/LayoutTests/fast/js/date-DST-time-cusps-expected.txt b/LayoutTests/fast/js/date-DST-time-cusps-expected.txt
new file mode 100644 (file)
index 0000000..138e322
--- /dev/null
@@ -0,0 +1,13 @@
+For times that happen twice the behavior of all major browsers seems to be to pick the second occurance, i.e. Standard Time not Daylight Time
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS (new Date(1982, 3, 25, 2, 10)).getHours() is 1
+PASS (new Date(1982,3,25,2)).getHours() is 1
+PASS (new Date(1982, 9, 31, 1, 10)).getTimezoneOffset() is 480
+PASS (new Date(1982, 9, 31, 1)).getTimezoneOffset() is 480
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/js/date-DST-time-cusps.html b/LayoutTests/fast/js/date-DST-time-cusps.html
new file mode 100644 (file)
index 0000000..4f40537
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="resources/js-test-style.css">
+<script src="resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/date-DST-time-cusps.js"></script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/js/resources/date-DST-time-cusps.js b/LayoutTests/fast/js/resources/date-DST-time-cusps.js
new file mode 100644 (file)
index 0000000..6b3ac8d
--- /dev/null
@@ -0,0 +1,18 @@
+description(
+"This tests times that shouldn't happen because of DST, or times that happen twice"
+);
+
+description(
+"For times that shouldn't happen we currently go back an hour, but in reality we would like to go forward an hour.  This has been filed as a radar: 4777813"
+);
+
+description(
+"For times that happen twice the behavior of all major browsers seems to be to pick the second occurance, i.e. Standard Time not Daylight Time"
+);
+
+shouldBe("(new Date(1982, 3, 25, 2, 10)).getHours()", "1");
+shouldBe("(new Date(1982,3,25,2)).getHours()", "1");
+shouldBe("(new Date(1982, 9, 31, 1, 10)).getTimezoneOffset()", "480");
+shouldBe("(new Date(1982, 9, 31, 1)).getTimezoneOffset()", "480");
+
+var successfullyParsed = true;
\ No newline at end of file