summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Date
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/Date/15.9.5.5.js2
-rw-r--r--js/src/tests/non262/Date/15.9.5.7.js2
-rw-r--r--js/src/tests/non262/Date/dashed-date.js9
-rw-r--r--js/src/tests/non262/Date/parse-dashed-numeric-date.js3
-rw-r--r--js/src/tests/non262/Date/parse-from-tostring-methods.js2
-rw-r--r--js/src/tests/non262/Date/parse-period.js3
-rw-r--r--js/src/tests/non262/Date/parse-time-zone.js2
-rw-r--r--js/src/tests/non262/Date/parse-zulu-time.js2
-rw-r--r--js/src/tests/non262/Date/reset-time-zone-cache-same-offset.js2
-rw-r--r--js/src/tests/non262/Date/time-zone-etc_localetime.js2
-rw-r--r--js/src/tests/non262/Date/time-zone-path.js2
-rw-r--r--js/src/tests/non262/Date/time-zones-historic.js2
-rw-r--r--js/src/tests/non262/Date/time-zones-imported.js2
-rw-r--r--js/src/tests/non262/Date/time-zones-pedantic.js2
-rw-r--r--js/src/tests/non262/Date/time-zones-posix.js2
-rw-r--r--js/src/tests/non262/Date/time-zones.js2
-rw-r--r--js/src/tests/non262/Date/toString-localized.js2
17 files changed, 23 insertions, 20 deletions
diff --git a/js/src/tests/non262/Date/15.9.5.5.js b/js/src/tests/non262/Date/15.9.5.5.js
index 1a21b33a63..e047bafeb9 100644
--- a/js/src/tests/non262/Date/15.9.5.5.js
+++ b/js/src/tests/non262/Date/15.9.5.5.js
@@ -1,4 +1,4 @@
-// |reftest| random-if(xulRuntime.OS=="Linux")
+// |reftest| random-if(gtkWidget)
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/js/src/tests/non262/Date/15.9.5.7.js b/js/src/tests/non262/Date/15.9.5.7.js
index 0ce2df9a26..980ca514d1 100644
--- a/js/src/tests/non262/Date/15.9.5.7.js
+++ b/js/src/tests/non262/Date/15.9.5.7.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/js/src/tests/non262/Date/dashed-date.js b/js/src/tests/non262/Date/dashed-date.js
index d7b4692e7f..58302713bc 100644
--- a/js/src/tests/non262/Date/dashed-date.js
+++ b/js/src/tests/non262/Date/dashed-date.js
@@ -8,8 +8,6 @@ const tests = [
["24-APRIL-2023", "2023-04-24T00:00:00"],
["24-Apr-2033", "2033-04-24T00:00:00"],
- ["24-Apr-0023", "0023-04-24T00:00:00"],
-
// dd-MMM-yy
["24-Apr-23", "2023-04-24T00:00:00"],
["24-Apr-33", "2033-04-24T00:00:00"],
@@ -24,7 +22,12 @@ const tests = [
["APRIL-24-2023", "2023-04-24T00:00:00"],
["Apr-24-2033", "2033-04-24T00:00:00"],
- ["Apr-24-0023", "0023-04-24T00:00:00"],
+ // Year should get fixed up even with leading 0s
+ ["Apr-24-23", "2023-04-24T00:00:00"],
+ ["Apr-24-0023", "2023-04-24T00:00:00"],
+ ["24-Apr-0023", "2023-04-24T00:00:00"],
+ ["24-Apr-00023", "2023-04-24T00:00:00"],
+ ["24-Apr-000023", "2023-04-24T00:00:00"],
// MMM-dd-yy
["Apr-24-23", "2023-04-24T00:00:00"],
diff --git a/js/src/tests/non262/Date/parse-dashed-numeric-date.js b/js/src/tests/non262/Date/parse-dashed-numeric-date.js
index b0bd1a35ec..b6a0d1e7f9 100644
--- a/js/src/tests/non262/Date/parse-dashed-numeric-date.js
+++ b/js/src/tests/non262/Date/parse-dashed-numeric-date.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -28,6 +28,7 @@ inTimeZone("MST", () => {
// 1-12 for first number should be month
"1-09-12": new Date(2012, Month.January, 9),
+ "1-09-0012": new Date(2012, Month.January, 9),
"1-09-2012": new Date(2012, Month.January, 9),
"12-09-12": new Date(2012, Month.December, 9),
diff --git a/js/src/tests/non262/Date/parse-from-tostring-methods.js b/js/src/tests/non262/Date/parse-from-tostring-methods.js
index b6bf577bb0..f9c17fac37 100644
--- a/js/src/tests/non262/Date/parse-from-tostring-methods.js
+++ b/js/src/tests/non262/Date/parse-from-tostring-methods.js
@@ -1,6 +1,4 @@
let dates = [
- "0041-09-23", "+000041-09-23", "-000041-09-23",
- "0091-09-23", "+000091-09-23", "-000091-09-23",
"0217-09-23", "+000217-09-23", "-000217-09-23",
"2017-09-23", "+002017-09-23", "-002017-09-23",
"+022017-09-23", "-022017-09-23",
diff --git a/js/src/tests/non262/Date/parse-period.js b/js/src/tests/non262/Date/parse-period.js
index 835512823e..edd18dc7eb 100644
--- a/js/src/tests/non262/Date/parse-period.js
+++ b/js/src/tests/non262/Date/parse-period.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -9,6 +9,7 @@ const tests = [
"Aug.. 15, 2015",
"Aug.15.2015",
"15.Aug.2015",
+ "15.Aug.0015",
"Aug 15 2015 12:00 am.",
"Sat. Aug 15 2015",
"2015.08.15",
diff --git a/js/src/tests/non262/Date/parse-time-zone.js b/js/src/tests/non262/Date/parse-time-zone.js
index c239822b04..692aa3af10 100644
--- a/js/src/tests/non262/Date/parse-time-zone.js
+++ b/js/src/tests/non262/Date/parse-time-zone.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
// bug 1676708
inTimeZone("Europe/London", () => {
diff --git a/js/src/tests/non262/Date/parse-zulu-time.js b/js/src/tests/non262/Date/parse-zulu-time.js
index a7bcd3bd00..2092ed400d 100644
--- a/js/src/tests/non262/Date/parse-zulu-time.js
+++ b/js/src/tests/non262/Date/parse-zulu-time.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/js/src/tests/non262/Date/reset-time-zone-cache-same-offset.js b/js/src/tests/non262/Date/reset-time-zone-cache-same-offset.js
index 56c9fc262c..c7e3915c95 100644
--- a/js/src/tests/non262/Date/reset-time-zone-cache-same-offset.js
+++ b/js/src/tests/non262/Date/reset-time-zone-cache-same-offset.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
const testCases = [
{
diff --git a/js/src/tests/non262/Date/time-zone-etc_localetime.js b/js/src/tests/non262/Date/time-zone-etc_localetime.js
index eaf8f7d940..f10056fb37 100644
--- a/js/src/tests/non262/Date/time-zone-etc_localetime.js
+++ b/js/src/tests/non262/Date/time-zone-etc_localetime.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||!xulRuntime.shell)
+// |reftest| skip-if(winWidget||!xulRuntime.shell)
assertEq(/^(PST|PDT)$/.test(getTimeZone()), true,
"The default time zone is set to PST8PDT for all jstests (when run in the shell)");
diff --git a/js/src/tests/non262/Date/time-zone-path.js b/js/src/tests/non262/Date/time-zone-path.js
index 0181093bac..266fe53ec8 100644
--- a/js/src/tests/non262/Date/time-zone-path.js
+++ b/js/src/tests/non262/Date/time-zone-path.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||!xulRuntime.shell||!this.hasOwnProperty("Intl"))
+// |reftest| skip-if(winWidget||!xulRuntime.shell||!this.hasOwnProperty("Intl"))
assertEq(/^(PST|PDT)$/.test(getTimeZone()), true,
"The default time zone is set to PST8PDT for all jstests (when run in the shell)");
diff --git a/js/src/tests/non262/Date/time-zones-historic.js b/js/src/tests/non262/Date/time-zones-historic.js
index 3117870687..e5649153b3 100644
--- a/js/src/tests/non262/Date/time-zones-historic.js
+++ b/js/src/tests/non262/Date/time-zones-historic.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
+// |reftest| skip-if(winWidget||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
// bug 487897
inTimeZone("Europe/London", () => {
diff --git a/js/src/tests/non262/Date/time-zones-imported.js b/js/src/tests/non262/Date/time-zones-imported.js
index 8a13e34981..f09cf22e13 100644
--- a/js/src/tests/non262/Date/time-zones-imported.js
+++ b/js/src/tests/non262/Date/time-zones-imported.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
+// |reftest| skip-if(winWidget||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
// Imported tests from es6draft and then adapted to use ICU/CLDR time zone display names.
diff --git a/js/src/tests/non262/Date/time-zones-pedantic.js b/js/src/tests/non262/Date/time-zones-pedantic.js
index c3445ed5fd..cd6d0c4490 100644
--- a/js/src/tests/non262/Date/time-zones-pedantic.js
+++ b/js/src/tests/non262/Date/time-zones-pedantic.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||xulRuntime.OS=="Darwin") -- Skip on OS X in addition to Windows
+// |reftest| skip-if(winWidget||cocoaWidget) -- Skip on OS X in addition to Windows
// Contains the tests from "time-zones.js" which fail on OS X.
diff --git a/js/src/tests/non262/Date/time-zones-posix.js b/js/src/tests/non262/Date/time-zones-posix.js
index c2d7cc20c9..21e81e9808 100644
--- a/js/src/tests/non262/Date/time-zones-posix.js
+++ b/js/src/tests/non262/Date/time-zones-posix.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"&&!xulRuntime.shell) -- Windows browser in automation doesn't pick up new time zones correctly
+// |reftest| skip-if(winWidget&&!xulRuntime.shell) -- Windows browser in automation doesn't pick up new time zones correctly
// Repeats the test from "time-zones.js", but uses POSIX instead of IANA names
// for the time zones. This allows to run these tests on Windows, too.
diff --git a/js/src/tests/non262/Date/time-zones.js b/js/src/tests/non262/Date/time-zones.js
index da2b328be7..550b1494b8 100644
--- a/js/src/tests/non262/Date/time-zones.js
+++ b/js/src/tests/non262/Date/time-zones.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT") -- Windows doesn't accept IANA names for the TZ env variable
+// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
// bug 158328
inTimeZone("Europe/London", () => {
diff --git a/js/src/tests/non262/Date/toString-localized.js b/js/src/tests/non262/Date/toString-localized.js
index 6baa535e5e..98bd3e54af 100644
--- a/js/src/tests/non262/Date/toString-localized.js
+++ b/js/src/tests/non262/Date/toString-localized.js
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
+// |reftest| skip-if(winWidget||!this.hasOwnProperty("Intl")) -- Windows doesn't accept IANA names for the TZ env variable; Requires ICU time zone support
// Date.prototype.toString includes a localized time zone name comment.