diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /js/src/jit-test/tests/basic/date-late-weekday-warning.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/basic/date-late-weekday-warning.js')
-rw-r--r-- | js/src/jit-test/tests/basic/date-late-weekday-warning.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/js/src/jit-test/tests/basic/date-late-weekday-warning.js b/js/src/jit-test/tests/basic/date-late-weekday-warning.js deleted file mode 100644 index ca6730e56c..0000000000 --- a/js/src/jit-test/tests/basic/date-late-weekday-warning.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Test deprecation warning for late weekday in Date.parse - */ - -function testWarn(date) { - const g = newGlobal(); - g.eval(`Date.parse("${date}")`); - const warning = getLastWarning(); - assertEq(warning !== null, true, `warning should be caught for ${date}`); - assertEq(warning.name, "Warning", warning.name); - - clearLastWarning(); - - g.eval(`Date.parse("${date}")`); - assertEq(getLastWarning(), null, "warning should not be caught for 2nd ocurrence"); -} - -function testNoWarn(date) { - Date.parse(date); - assertEq(getLastWarning(), null, `warning should not be caught for ${date}`); -} - -enableLastWarning(); - -testWarn("Sep 26 1995 Tues"); -testWarn("Sep 26 Tues 1995"); -testWarn("Sep 26 Tues 1995 Tues"); -testWarn("Sep 26 1995 10:Tues:00"); - -testNoWarn("Sep 26 1995"); -testNoWarn("Tues Sep 26 1995"); -testNoWarn("Sep Tues 26 1995"); - -disableLastWarning(); |