Skip to content
Permalink
Browse files
2010-01-28 Kent Tamura <tkent@chromium.org>
        Reviewed by Darin Fisher.

        Remove tests for dates later than 275760-09-13T00:00Z.
        https://bugs.webkit.org/show_bug.cgi?id=34240

        Date.UTC() of V8 doesn't support such dates though Date.UTC() of
        JavaScriptCore does.

        * fast/forms/input-valueasnumber-date-expected.txt:
        * fast/forms/input-valueasnumber-datetime-expected.txt:
        * fast/forms/input-valueasnumber-datetimelocal-expected.txt:
        * fast/forms/input-valueasnumber-month-expected.txt:
        * fast/forms/script-tests/input-valueasnumber-date.js:
        * fast/forms/script-tests/input-valueasnumber-datetime.js:
        * fast/forms/script-tests/input-valueasnumber-datetimelocal.js:
        * fast/forms/script-tests/input-valueasnumber-month.js:
        * platform/win/fast/forms/input-valueasnumber-datetime-expected.txt: Removed.

Canonical link: https://commits.webkit.org/45361@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
tkent-google committed Jan 28, 2010
1 parent 654260f commit 0fbc7853886fbb1b76ea1653e9153e67f654944e
Showing 10 changed files with 28 additions and 41 deletions.
@@ -1,3 +1,23 @@
2010-01-28 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Fisher.

Remove tests for dates later than 275760-09-13T00:00Z.
https://bugs.webkit.org/show_bug.cgi?id=34240

Date.UTC() of V8 doesn't support such dates though Date.UTC() of
JavaScriptCore does.

* fast/forms/input-valueasnumber-date-expected.txt:
* fast/forms/input-valueasnumber-datetime-expected.txt:
* fast/forms/input-valueasnumber-datetimelocal-expected.txt:
* fast/forms/input-valueasnumber-month-expected.txt:
* fast/forms/script-tests/input-valueasnumber-date.js:
* fast/forms/script-tests/input-valueasnumber-datetime.js:
* fast/forms/script-tests/input-valueasnumber-datetimelocal.js:
* fast/forms/script-tests/input-valueasnumber-month.js:
* platform/win/fast/forms/input-valueasnumber-datetime-expected.txt: Removed.

2010-01-27 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.
@@ -16,7 +16,6 @@ PASS setValueAsNumberAndGetValue(1582, 8, 30) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 15) is "1582-10-15"
PASS setValueAsNumberAndGetValue(1582, 9, 31) is "1582-10-31"
PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09-13"
PASS setValueAsNumberAndGetValue(275760, 8, 14) is "275760-09-14"
Tests to set invalid values to valueAsNumber:
PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01"
PASS input.valueAsNumber = "foo" threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
@@ -15,7 +15,6 @@ PASS setValueAsNumberAndGetValue(794, 9, 22, 0, 0, 0, 0) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 14, 23, 59, 59, 999) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 15, 0, 0, 0, 0) is "1582-10-15T00:00Z"
PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0) is "275760-09-13T00:00Z"
PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1) is "275760-09-13T00:00:00.001Z"
Tests to set invalid values to valueAsNumber:
PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01T00:00Z"
PASS input.valueAsNumber = "foo" threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
@@ -15,7 +15,6 @@ PASS setValueAsNumberAndGetValue(794, 9, 22, 0, 0, 0, 0) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 14, 23, 59, 59, 999) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 15, 0, 0, 0, 0) is "1582-10-15T00:00"
PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0) is "275760-09-13T00:00"
PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1) is "275760-09-13T00:00:00.001"
Tests to set invalid values to valueAsNumber:
PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01T00:00"
PASS input.valueAsNumber = "foo" threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
@@ -16,7 +16,6 @@ PASS setValueAsNumberAndGetValue(1582, 8, 30) is ""
PASS setValueAsNumberAndGetValue(1582, 9, 1) is "1582-10"
PASS setValueAsNumberAndGetValue(1582, 9, 31) is "1582-10"
PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09"
PASS setValueAsNumberAndGetValue(275760, 8, 14) is "275760-09"
Tests to set invalid values to valueAsNumber:
PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01"
PASS input.valueAsNumber = "foo" threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
@@ -28,7 +28,8 @@ shouldBe('setValueAsNumberAndGetValue(1582, 8, 30)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 15)', '"1582-10-15"');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 31)', '"1582-10-31"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13)', '"275760-09-13"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 14)', '"275760-09-14"');
// Date.UTC() of V8 throws an exception for the following value though JavaScriptCore doesn't.
// shouldBe('setValueAsNumberAndGetValue(275760, 8, 14)', '"275760-09-14"');

debug('Tests to set invalid values to valueAsNumber:');
shouldBe('input.value = ""; input.valueAsNumber = null; input.value', '"1970-01-01"');
@@ -27,7 +27,8 @@ shouldBe('setValueAsNumberAndGetValue(794, 9, 22, 0, 0, 0, 0)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 14, 23, 59, 59, 999)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 15, 0, 0, 0, 0)', '"1582-10-15T00:00Z"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0)', '"275760-09-13T00:00Z"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1)', '"275760-09-13T00:00:00.001Z"');
// Date.UTC() of V8 throws an exception for the following value though JavaScriptCore doesn't.
// shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1)', '"275760-09-13T00:00:00.001Z"');

debug('Tests to set invalid values to valueAsNumber:');
shouldBe('input.value = ""; input.valueAsNumber = null; input.value', '"1970-01-01T00:00Z"');
@@ -27,7 +27,8 @@ shouldBe('setValueAsNumberAndGetValue(794, 9, 22, 0, 0, 0, 0)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 14, 23, 59, 59, 999)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 15, 0, 0, 0, 0)', '"1582-10-15T00:00"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0)', '"275760-09-13T00:00"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1)', '"275760-09-13T00:00:00.001"');
// Date.UTC() of V8 throws an exception for the following value though JavaScriptCore doesn't.
// shouldBe('setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 1)', '"275760-09-13T00:00:00.001"');

debug('Tests to set invalid values to valueAsNumber:');
shouldBe('input.value = ""; input.valueAsNumber = null; input.value', '"1970-01-01T00:00"');
@@ -28,7 +28,8 @@ shouldBe('setValueAsNumberAndGetValue(1582, 8, 30)', '""');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 1)', '"1582-10"');
shouldBe('setValueAsNumberAndGetValue(1582, 9, 31)', '"1582-10"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 13)', '"275760-09"');
shouldBe('setValueAsNumberAndGetValue(275760, 8, 14)', '"275760-09"');
// Date.UTC() of V8 throws an exception for the following value though JavaScriptCore doesn't.
// shouldBe('setValueAsNumberAndGetValue(275760, 8, 14)', '"275760-09"');

debug('Tests to set invalid values to valueAsNumber:');
shouldBe('input.value = ""; input.valueAsNumber = null; input.value', '"1970-01"');

This file was deleted.

0 comments on commit 0fbc785

Please sign in to comment.