diff options
author | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-08-12 00:31:12 +0000 |
---|---|---|
committer | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-08-12 00:31:12 +0000 |
commit | 5db9a00195174e26a6dd6102364044c60acefc88 (patch) | |
tree | b3b93450d1085034013c9b5e73562d00ccc7e724 /third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js | |
parent | f5c35390e62ab362ddb91e954a9c157f0f8dd736 (diff) | |
download | chromium_src-5db9a00195174e26a6dd6102364044c60acefc88.zip chromium_src-5db9a00195174e26a6dd6102364044c60acefc88.tar.gz chromium_src-5db9a00195174e26a6dd6102364044c60acefc88.tar.bz2 |
2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Geoffrey Garen.
Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
which means isNaN(new Date("")) should return true.
https://bugs.webkit.org/show_bug.cgi?id=43793
Tests: fast/js/date-constructor.html
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::resetDateCache):
2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Geoffrey Garen.
Add isNaN(new Date("")) test to fast/js/script-tests/date-constructor.js.
https://bugs.webkit.org/show_bug.cgi?id=43793
* fast/js/date-constructor-expected.txt:
* fast/js/script-tests/date-constructor.js:
git-svn-id: svn://svn.chromium.org/blink/trunk@65201 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js b/third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js index 7b214630..ffe0b0a 100644 --- a/third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js +++ b/third_party/WebKit/LayoutTests/fast/js/script-tests/date-constructor.js @@ -8,6 +8,8 @@ var object = new Object; object.valueOf = function() { return 1111; } object.toSTring = function() { return "2222"; } +shouldBe('isNaN(new Date(""))', 'true'); + var timeZoneOffset = Date.parse("Dec 25 1995") - Date.parse("Dec 25 1995 GMT"); shouldBe('new Date(1111).getTime()', '1111'); |