⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286316 in webkit


Ignore:
Timestamp:
Nov 30, 2021, 12:39:07 PM (5 years ago)
Author:
Chris Dumez
Message:

Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks
https://bugs.webkit.org/show_bug.cgi?id=233604

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-typeMismatch-expected.txt:

Source/WebCore:

Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks.
Per the specification and to match the behavior of Blink & Gecko, ValidityState properties such as
validity.typeMismatch should return true in case of mismatch even if the control is disabled (and thus
willValidate() returns false).

No new tests, rebaselined existing tests.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::tooShort const):
(WebCore::HTMLInputElement::tooLong const):
(WebCore::HTMLInputElement::typeMismatch const):
(WebCore::HTMLInputElement::hasBadInput const):
(WebCore::HTMLInputElement::rangeUnderflow const):
(WebCore::HTMLInputElement::rangeOverflow const):
(WebCore::HTMLInputElement::stepMismatch const):

LayoutTests:

Rebaseline WPT tests now that more checks are passing.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt:
Location:
trunk
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r286305 r286316  
     12021-11-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks
     4        https://bugs.webkit.org/show_bug.cgi?id=233604
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline WPT tests now that more checks are passing.
     9
     10        * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt:
     11        * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt:
     12        * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt:
     13
    1142021-11-30  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/LayoutTests/fast/forms/ValidityState-typeMismatch-url-expected.txt

    r207162 r286316  
    4343PASS http://host+ is a correct valid url.
    4444PASS http://myurl! is a correct valid url.
    45 PASS invalid is a correct valid url when disabled.
     45PASS invalid is a correct invalid url.
    4646PASS successfullyParsed is true
    4747
  • trunk/LayoutTests/fast/forms/ValidityState-typeMismatch-url.html

    r207162 r286316  
    7878
    7979// Disabled
    80 expectValid('invalid', true);
     80expectInvalid('invalid', true);
    8181</script>
    8282<script src="../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/date/ValidityState-rangeOverflow-date-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01-01" overflows the maximum value "2010-12-31".
    1616PASS The value "2010-01-27" overflows the maximum value "2010-01-26".
    17 PASS The value "9999-01-01" doesn't overflow the maximum value "2010-12-31" when disabled.
     17PASS The value "9999-01-01" overflows the maximum value "2010-12-31" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/date/ValidityState-rangeOverflow-date.html

    r155268 r286316  
    6868
    6969// Disabled
    70 checkNotOverflow('9999-01-01', '2010-12-31', true);
     70checkOverflow('9999-01-01', '2010-12-31', true);
    7171</script>
    7272<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/date/ValidityState-rangeUnderflow-date-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01-01" undeflows the minimum value "10000-12-31".
    1616PASS The value "2010-01-27" undeflows the minimum value "2010-02-01".
    17 PASS The value "9999-01-01" doesn't underflow the minimum value "10000-12-31" when disabled.
     17PASS The value "9999-01-01" undeflows the minimum value "10000-12-31" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/date/ValidityState-rangeUnderflow-date.html

    r155268 r286316  
    7070
    7171// Disabled
    72 checkNotUnderflow('9999-01-01', '10000-12-31', true);
     72checkUnderflow('9999-01-01', '10000-12-31', true);
    7373</script>
    7474<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/date/ValidityState-stepMismatch-date-expected.txt

    r92819 r286316  
    3030PASS stepMismatchFor("2010-02-10", "any", "2010-02-09") is false
    3131Disabled
    32 PASS stepMismatchFor("2010-02-10", "2", "2010-02-09", true) is false
     32PASS stepMismatchFor("2010-02-10", "2", "2010-02-09", true) is true
    3333
    3434PASS successfullyParsed is true
  • trunk/LayoutTests/fast/forms/date/ValidityState-stepMismatch-date.html

    r155268 r286316  
    4848shouldBeFalse('stepMismatchFor("2010-02-10", "any", "2010-02-09")');
    4949debug('Disabled');
    50 shouldBeFalse('stepMismatchFor("2010-02-10", "2", "2010-02-09", true)');
     50shouldBeTrue('stepMismatchFor("2010-02-10", "2", "2010-02-09", true)');
    5151
    5252debug('');
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-rangeOverflow-datetimelocal-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01-01T23:59" overflows the maximum value "2010-12-31T00:00".
    1616PASS The value "2010-01-27T12:34" overflows the maximum value "2010-01-26T12:34".
    17 PASS The value "9999-01-01T23:59" doesn't overflow the maximum value "2010-12-31T00:00" when disabled.
     17PASS The value "9999-01-01T23:59" overflows the maximum value "2010-12-31T00:00" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-rangeOverflow-datetimelocal.html

    r155268 r286316  
    6868
    6969// Disabled
    70 checkNotOverflow('9999-01-01T23:59', '2010-12-31T00:00', true);
     70checkOverflow('9999-01-01T23:59', '2010-12-31T00:00', true);
    7171</script>
    7272<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-rangeUnderflow-datetimelocal-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01-01T12:00" undeflows the minimum value "10000-12-31T12:00".
    1616PASS The value "2010-01-27T12:00" undeflows the minimum value "2010-02-01T12:00".
    17 PASS The value "9999-01-01T12:00" doesn't underflow the minimum value "10000-12-31T12:00" when disabled.
     17PASS The value "9999-01-01T12:00" undeflows the minimum value "10000-12-31T12:00" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-rangeUnderflow-datetimelocal.html

    r155268 r286316  
    7070
    7171// Disabled
    72 checkNotUnderflow('9999-01-01T12:00', '10000-12-31T12:00', true);
     72checkUnderflow('9999-01-01T12:00', '10000-12-31T12:00', true);
    7373</script>
    7474<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-stepMismatch-datetimelocal-expected.txt

    r92754 r286316  
    3333PASS stepMismatchFor("2010-02-09T12:34", "any", "2010-02-09T12:34") is false
    3434Disabled
    35 PASS stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56", true) is false
     35PASS stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56", true) is true
    3636PASS successfullyParsed is true
    3737
  • trunk/LayoutTests/fast/forms/datetimelocal/ValidityState-stepMismatch-datetimelocal.html

    r155268 r286316  
    5151shouldBeFalse('stepMismatchFor("2010-02-09T12:34", "any", "2010-02-09T12:34")');
    5252debug('Disabled');
    53 shouldBeFalse('stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56", true)');
     53shouldBeTrue('stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56", true)');
    5454</script>
    5555<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/month/ValidityState-rangeOverflow-month-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01" overflows the maximum value "2010-12".
    1616PASS The value "2010-01" overflows the maximum value "2009-12".
    17 PASS The value "9999-01" doesn't overflow the maximum value "2010-12" when disabled.
     17PASS The value "9999-01" overflows the maximum value "2010-12" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/month/ValidityState-rangeOverflow-month.html

    r155268 r286316  
    6868
    6969// Disabled
    70 checkNotOverflow('9999-01', '2010-12', true);
     70checkOverflow('9999-01', '2010-12', true);
    7171</script>
    7272<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/month/ValidityState-rangeUnderflow-month-expected.txt

    r195834 r286316  
    1515PASS The value "9999-01" undeflows the minimum value "10000-12".
    1616PASS The value "2010-01" undeflows the minimum value "2010-02".
    17 PASS The value "9999-01" doesn't underflow the minimum value "10000-12" when disabled.
     17PASS The value "9999-01" undeflows the minimum value "10000-12" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/month/ValidityState-rangeUnderflow-month.html

    r155268 r286316  
    7070
    7171// Disabled
    72 checkNotUnderflow('9999-01', '10000-12', true);
     72checkUnderflow('9999-01', '10000-12', true);
    7373</script>
    7474<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/month/ValidityState-stepMismatch-month-expected.txt

    r92741 r286316  
    3030PASS stepMismatchFor("2010-03", "any", "2010-02") is false
    3131Disabled
    32 PASS stepMismatchFor("2010-03", "2", "2010-02", true) is false
     32PASS stepMismatchFor("2010-03", "2", "2010-02", true) is true
    3333
    3434PASS successfullyParsed is true
  • trunk/LayoutTests/fast/forms/month/ValidityState-stepMismatch-month.html

    r155268 r286316  
    4848shouldBeFalse('stepMismatchFor("2010-03", "any", "2010-02")');
    4949debug('Disabled');
    50 shouldBeFalse('stepMismatchFor("2010-03", "2", "2010-02", true)');
     50shouldBeTrue('stepMismatchFor("2010-03", "2", "2010-02", true)');
    5151
    5252debug('');
  • trunk/LayoutTests/fast/forms/number/number-validity-rangeoverflow-expected.txt

    r123836 r286316  
    1818PASS The value "101" overflows the maximum value "1E+2".
    1919PASS The value "101" overflows the maximum value "100".
    20 PASS The value "101" doesn't overflow the maximum value "1E+2" when disabled.
     20PASS The value "101" overflows the maximum value "1E+2" when disabled.
    2121PASS successfullyParsed is true
    2222
  • trunk/LayoutTests/fast/forms/number/number-validity-rangeoverflow.html

    r155268 r286316  
    6262
    6363// Disabled
    64 checkNotOverflow('101', '1E+2', true);
     64checkOverflow('101', '1E+2', true);
    6565</script>
    6666<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/number/number-validity-rangeunderflow-expected.txt

    r123836 r286316  
    1818PASS The value "99" undeflows the minimum value "1E+2".
    1919PASS The value "101" undeflows the minimum value "200".
    20 PASS The value "99" doesn't underflow the minimum value "1E+2" when disabled.
     20PASS The value "99" undeflows the minimum value "1E+2" when disabled.
    2121PASS successfullyParsed is true
    2222
  • trunk/LayoutTests/fast/forms/number/number-validity-rangeunderflow.html

    r155268 r286316  
    6464
    6565// Disabled
    66 checkNotUnderflow('99', '1E+2', true);
     66checkUnderflow('99', '1E+2', true);
    6767</script>
    6868<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/number/number-validity-stepmismatch-expected.txt

    r123836 r286316  
    3232PASS stepMismatchFor("5.005", "0.005", "4") is false
    3333Disabled
    34 PASS stepMismatchFor("1", "2", "0", true) is false
     34PASS stepMismatchFor("1", "2", "0", true) is true
    3535PASS successfullyParsed is true
    3636
  • trunk/LayoutTests/fast/forms/number/number-validity-stepmismatch.html

    r155268 r286316  
    4949shouldBe('stepMismatchFor("5.005", "0.005", "4")', 'false');
    5050debug('Disabled');
    51 shouldBe('stepMismatchFor("1", "2", "0", true)', 'false');
     51shouldBe('stepMismatchFor("1", "2", "0", true)', 'true');
    5252</script>
    5353<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/time/time-validity-rangeoverflow-expected.txt

    r195834 r286316  
    1414PASS The value "23:59:59.999" overflows the maximum value "13:16".
    1515PASS The value "13:16" overflows the maximum value "12:00".
    16 PASS The value "23:59:59.999" doesn't overflow the maximum value "13:16" when disabled.
     16PASS The value "23:59:59.999" overflows the maximum value "13:16" when disabled.
    1717PASS successfullyParsed is true
    1818
  • trunk/LayoutTests/fast/forms/time/time-validity-rangeoverflow.html

    r155268 r286316  
    6767
    6868// Disabled
    69 checkNotOverflow('23:59:59.999', '13:16', true);
     69checkOverflow('23:59:59.999', '13:16', true);
    7070</script>
    7171<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/time/time-validity-rangeunderflow-expected.txt

    r195834 r286316  
    1515PASS The value "23:59" undeflows the minimum value "23:59:30".
    1616PASS The value "13:16" undeflows the minimum value "14:00".
    17 PASS The value "23:59" doesn't underflow the minimum value "23:59:30" when disabled.
     17PASS The value "23:59" undeflows the minimum value "23:59:30" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/time/time-validity-rangeunderflow.html

    r155268 r286316  
    6868
    6969// Disabled
    70 checkNotUnderflow('23:59', '23:59:30', true);
     70checkUnderflow('23:59', '23:59:30', true);
    7171</script>
    7272<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/time/time-validity-stepmismatch-expected.txt

    r123836 r286316  
    3131PASS stepMismatchFor("12:35", "any", "12:34") is false
    3232Disabled
    33 PASS stepMismatchFor("12:34:55.001", "1", "12:34:56", true) is false
     33PASS stepMismatchFor("12:34:55.001", "1", "12:34:56", true) is true
    3434
    3535PASS successfullyParsed is true
  • trunk/LayoutTests/fast/forms/time/time-validity-stepmismatch.html

    r155268 r286316  
    4949shouldBeFalse('stepMismatchFor("12:35", "any", "12:34")');
    5050debug('Disabled');
    51 shouldBeFalse('stepMismatchFor("12:34:55.001", "1", "12:34:56", true)');
     51shouldBeTrue('stepMismatchFor("12:34:55.001", "1", "12:34:56", true)');
    5252
    5353debug('');
  • trunk/LayoutTests/fast/forms/week/ValidityState-rangeOverflow-week-expected.txt

    r195834 r286316  
    1616PASS The value "9999-W01" overflows the maximum value "2010-W12".
    1717PASS The value "2010-W01" overflows the maximum value "2009-W50".
    18 PASS The value "9999-W01" doesn't overflow the maximum value "2010-W12" when disabled.
     18PASS The value "9999-W01" overflows the maximum value "2010-W12" when disabled.
    1919PASS successfullyParsed is true
    2020
  • trunk/LayoutTests/fast/forms/week/ValidityState-rangeOverflow-week.html

    r155268 r286316  
    6969
    7070// Disabled
    71 checkNotOverflow('9999-W01', '2010-W12', true);
     71checkOverflow('9999-W01', '2010-W12', true);
    7272</script>
    7373<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/week/ValidityState-rangeUnderflow-week-expected.txt

    r195834 r286316  
    1515PASS The value "9999-W01" undeflows the minimum value "10000-W12".
    1616PASS The value "2010-W01" undeflows the minimum value "2010-W02".
    17 PASS The value "9999-W01" doesn't underflow the minimum value "10000-W12" when disabled.
     17PASS The value "9999-W01" undeflows the minimum value "10000-W12" when disabled.
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/forms/week/ValidityState-rangeUnderflow-week.html

    r155268 r286316  
    7070
    7171// Disabled
    72 checkNotUnderflow('9999-W01', '10000-W12', true);
     72checkUnderflow('9999-W01', '10000-W12', true);
    7373</script>
    7474<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/forms/week/ValidityState-stepMismatch-week-expected.txt

    r92427 r286316  
    3232PASS stepMismatchFor("2010-W03", "any", "2010-W02") is false
    3333Disabled
    34 PASS stepMismatchFor("2010-W03", "2", "2010-W02", true) is false
     34PASS stepMismatchFor("2010-W03", "2", "2010-W02", true) is true
    3535PASS successfullyParsed is true
    3636
  • trunk/LayoutTests/fast/forms/week/ValidityState-stepMismatch-week.html

    r155268 r286316  
    5050shouldBeFalse('stepMismatchFor("2010-W03", "any", "2010-W02")');
    5151debug('Disabled');
    52 shouldBeFalse('stepMismatchFor("2010-W03", "2", "2010-W02", true)');
     52shouldBeTrue('stepMismatchFor("2010-W03", "2", "2010-W02", true)');
    5353</script>
    5454<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r286315 r286316  
     12021-11-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks
     4        https://bugs.webkit.org/show_bug.cgi?id=233604
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline WPT tests now that more checks are passing.
     9
     10        * web-platform-tests/html/semantics/forms/constraints/form-validation-validity-typeMismatch-expected.txt:
     11
    1122021-11-30  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt

    r267646 r286316  
    1111PASS [INPUT in NUMBER status] The max equals to value
    1212PASS [INPUT in NUMBER status] The value is not a number
    13 FAIL [INPUT in NUMBER status] The value is greater than max(integer) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    14 FAIL [INPUT in NUMBER status] The value is greater than max(floating number) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    15 FAIL [INPUT in NUMBER status] The value is greater than max(special floating number) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    16 FAIL [INPUT in NUMBER status] The value is greater than max(scientific notation) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     13PASS [INPUT in NUMBER status] The value is greater than max(integer)
     14PASS [INPUT in NUMBER status] The value is greater than max(floating number)
     15PASS [INPUT in NUMBER status] The value is greater than max(special floating number)
     16PASS [INPUT in NUMBER status] The value is greater than max(scientific notation)
    1717
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt

    r267646 r286316  
    1111PASS [INPUT in NUMBER status] The min equals to value
    1212PASS [INPUT in NUMBER status] The value is not a number
    13 FAIL [INPUT in NUMBER status] The value is less than min(integer) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    14 FAIL [INPUT in NUMBER status] The value is less than min(floating number) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    15 FAIL [INPUT in NUMBER status] The value is less than min(special floating number) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    16 FAIL [INPUT in NUMBER status] The value is less than min(scientific notation) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     13PASS [INPUT in NUMBER status] The value is less than min(integer)
     14PASS [INPUT in NUMBER status] The value is less than min(floating number)
     15PASS [INPUT in NUMBER status] The value is less than min(special floating number)
     16PASS [INPUT in NUMBER status] The value is less than min(scientific notation)
    1717
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt

    r267646 r286316  
    66FAIL [INPUT in DATETIME-LOCAL status] The datetime-local type must be supported. assert_equals: The datetime-local type should be supported. expected "datetime-local" but got "text"
    77PASS [INPUT in NUMBER status] The step attribute is not set
    8 FAIL [INPUT in NUMBER status] The step attribute is not set and the value attribute is a floating number assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     8PASS [INPUT in NUMBER status] The step attribute is not set and the value attribute is a floating number
    99PASS [INPUT in NUMBER status] The value attribute is empty string
    1010PASS [INPUT in NUMBER status] The value must match the step
    11 FAIL [INPUT in NUMBER status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     11PASS [INPUT in NUMBER status] The value must mismatch the step
    1212PASS [INPUT in NUMBER status] No step mismatch when step is a floating number and value is its integral multiple
    1313PASS [INPUT in NUMBER status] No step mismatch when step is a floating number in exponent format and value is its integral multiple
    14 FAIL [INPUT in NUMBER status] Step mismatch when step is a very small floating number and value is not its integral multiple assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     14PASS [INPUT in NUMBER status] Step mismatch when step is a very small floating number and value is not its integral multiple
    1515
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-typeMismatch-expected.txt

    r267646 r286316  
    33PASS [INPUT in EMAIL status] The value is a valid email address
    44PASS [INPUT in EMAIL status] The value is a valid email address with some white spaces.
    5 FAIL [INPUT in EMAIL status] The value is not an email address assert_true: The validity.typeMismatch should be true, when control is disabled. expected true got false
    6 FAIL [INPUT in EMAIL status] The value contains multiple email addresses assert_true: The validity.typeMismatch should be true, when control is disabled. expected true got false
     5PASS [INPUT in EMAIL status] The value is not an email address
     6PASS [INPUT in EMAIL status] The value contains multiple email addresses
    77PASS [INPUT in EMAIL status] The value is valid email addresses
    8 FAIL [INPUT in EMAIL status] The value contains invalid separator assert_true: The validity.typeMismatch should be true, when control is disabled. expected true got false
     8PASS [INPUT in EMAIL status] The value contains invalid separator
    99PASS [INPUT in URL status] The value is empty
    1010PASS [INPUT in URL status] The value is a valid url
    1111PASS [INPUT in URL status] The value is a valid url with some white spaces.
    12 FAIL [INPUT in URL status] The value is not an url assert_true: The validity.typeMismatch should be true, when control is disabled. expected true got false
     12PASS [INPUT in URL status] The value is not an url
    1313
  • trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt

    r267658 r286316  
    66PASS [INPUT in DATETIME-LOCAL status] The value is an invalid local date time string(hour is greater than 23)
    77PASS [INPUT in DATETIME-LOCAL status] The value if an invalid local date time string(year is two digits)
    8 FAIL [INPUT in DATETIME-LOCAL status] The value is greater than max assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    9 FAIL [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 1 digit) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    10 FAIL [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 2 digits) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    11 FAIL [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 3 digits) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    12 FAIL [INPUT in DATETIME-LOCAL status] The value is greater than max(Year is 10000 should be valid) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     8PASS [INPUT in DATETIME-LOCAL status] The value is greater than max
     9PASS [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 1 digit)
     10PASS [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 2 digits)
     11PASS [INPUT in DATETIME-LOCAL status] The value is greater than max(with millisecond in 3 digits)
     12PASS [INPUT in DATETIME-LOCAL status] The value is greater than max(Year is 10000 should be valid)
    1313PASS [INPUT in DATE status] The max attribute is not set
    1414PASS [INPUT in DATE status] Value is empty string
     
    1919PASS [INPUT in DATE status] The value is an invalid date(date is greater than 29 for Feb)
    2020PASS [INPUT in DATE status] The max attribute is greater than value attribute
    21 FAIL [INPUT in DATE status] The value attribute is greater than max attribute assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    22 FAIL [INPUT in DATE status] The value attribute is greater than max attribute(Year is 10000 should be valid) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     21PASS [INPUT in DATE status] The value attribute is greater than max attribute
     22PASS [INPUT in DATE status] The value attribute is greater than max attribute(Year is 10000 should be valid)
    2323PASS [INPUT in MONTH status] The max attribute is not set
    2424PASS [INPUT in MONTH status] Value is empty string
     
    2828PASS [INPUT in MONTH status] The value is an invalid month string(month is greater than 12)
    2929PASS [INPUT in MONTH status] The max attribute is greater than value attribute
    30 FAIL [INPUT in MONTH status] The value attribute is greater than max attribute assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    31 FAIL [INPUT in MONTH status] The value attribute is greater than max attribute(Year is 10000 should be valid) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     30PASS [INPUT in MONTH status] The value attribute is greater than max attribute
     31PASS [INPUT in MONTH status] The value attribute is greater than max attribute(Year is 10000 should be valid)
    3232PASS [INPUT in WEEK status] The max attribute is not set
    3333PASS [INPUT in WEEK status] Value is empty string
     
    3838PASS [INPUT in WEEK status] The value is an invalid week string(week is too greater)
    3939PASS [INPUT in WEEK status] The max attribute is greater than value attribute
    40 FAIL [INPUT in WEEK status] The value attribute is greater than max attribute assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    41 FAIL [INPUT in WEEK status] The value attribute is greater than max attribute(Year is 10000 should be valid) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     40PASS [INPUT in WEEK status] The value attribute is greater than max attribute
     41PASS [INPUT in WEEK status] The value attribute is greater than max attribute(Year is 10000 should be valid)
    4242PASS [INPUT in TIME status] The max attribute is not set
    4343PASS [INPUT in TIME status] Value is empty string
     
    4949PASS [INPUT in TIME status] The max attribute is greater than value attribute
    5050PASS [INPUT in TIME status] The time missing second and minute parts is invalid
    51 FAIL [INPUT in TIME status] The value attribute is greater than max attribute assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    52 FAIL [INPUT in TIME status] The value is greater than max(with millisecond in 1 digit) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    53 FAIL [INPUT in TIME status] The value is greater than max(with millisecond in 2 digit) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    54 FAIL [INPUT in TIME status] The value is greater than max(with millisecond in 3 digit) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    55 FAIL [INPUT in TIME status] The time missing second part is valid assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     51PASS [INPUT in TIME status] The value attribute is greater than max attribute
     52PASS [INPUT in TIME status] The value is greater than max(with millisecond in 1 digit)
     53PASS [INPUT in TIME status] The value is greater than max(with millisecond in 2 digit)
     54PASS [INPUT in TIME status] The value is greater than max(with millisecond in 3 digit)
     55PASS [INPUT in TIME status] The time missing second part is valid
    5656PASS [INPUT in TIME status] The time is max for reversed range
    57 FAIL [INPUT in TIME status] The time is outside the accepted range for reversed range assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     57PASS [INPUT in TIME status] The time is outside the accepted range for reversed range
    5858FAIL [INPUT in TIME status] The time is min for reversed range assert_false: The validity.rangeOverflow should be false. expected false got true
    5959FAIL [INPUT in TIME status] The time is inside the accepted range for reversed range assert_false: The validity.rangeOverflow should be false. expected false got true
     
    6464PASS [INPUT in NUMBER status] The max equals to value
    6565PASS [INPUT in NUMBER status] The value is not a number
    66 FAIL [INPUT in NUMBER status] The value is greater than max(integer) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    67 FAIL [INPUT in NUMBER status] The value is greater than max(floating number) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    68 FAIL [INPUT in NUMBER status] The value is greater than max(special floating number) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
    69 FAIL [INPUT in NUMBER status] The value is greater than max(scientific notation) assert_true: The validity.rangeOverflow should be true, when control is disabled. expected true got false
     66PASS [INPUT in NUMBER status] The value is greater than max(integer)
     67PASS [INPUT in NUMBER status] The value is greater than max(floating number)
     68PASS [INPUT in NUMBER status] The value is greater than max(special floating number)
     69PASS [INPUT in NUMBER status] The value is greater than max(scientific notation)
    7070
  • trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt

    r267658 r286316  
    66PASS [INPUT in DATETIME-LOCAL status] The value is an invalid local date time string(hour is greater than 23)
    77PASS [INPUT in DATETIME-LOCAL status] The value is an invalid local date time string(year is two digits)
    8 FAIL [INPUT in DATETIME-LOCAL status] The value is less than min assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    9 FAIL [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 1 digit) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    10 FAIL [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 2 digits) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    11 FAIL [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 3 digits) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    12 FAIL [INPUT in DATETIME-LOCAL status] The value is less than min(Year is 10000 should be valid) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     8PASS [INPUT in DATETIME-LOCAL status] The value is less than min
     9PASS [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 1 digit)
     10PASS [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 2 digits)
     11PASS [INPUT in DATETIME-LOCAL status] The value is less than min(with millisecond in 3 digits)
     12PASS [INPUT in DATETIME-LOCAL status] The value is less than min(Year is 10000 should be valid)
    1313PASS [INPUT in DATETIME-LOCAL status] The value is greater than max
    1414PASS [INPUT in DATE status] The min attribute is not set
     
    2020PASS [INPUT in DATE status] The value is an invalid date(date is less than 29 for Feb)
    2121PASS [INPUT in DATE status] The min attribute is less than value attribute
    22 FAIL [INPUT in DATE status] The value attribute is less than min attribute assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    23 FAIL [INPUT in DATE status] The value attribute is less than min attribute(Year is 10000 should be valid) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     22PASS [INPUT in DATE status] The value attribute is less than min attribute
     23PASS [INPUT in DATE status] The value attribute is less than min attribute(Year is 10000 should be valid)
    2424PASS [INPUT in MONTH status] The min attribute is not set
    2525PASS [INPUT in MONTH status] Value is empty string
     
    2929PASS [INPUT in MONTH status] The value is an invalid month string(month is less than 12)
    3030PASS [INPUT in MONTH status] The min attribute is less than value attribute
    31 FAIL [INPUT in MONTH status] The value attribute is less than min attribute assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    32 FAIL [INPUT in MONTH status] The value attribute is less than min attribute(Year is 10000 should be valid) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     31PASS [INPUT in MONTH status] The value attribute is less than min attribute
     32PASS [INPUT in MONTH status] The value attribute is less than min attribute(Year is 10000 should be valid)
    3333PASS [INPUT in WEEK status] The min attribute is not set
    3434PASS [INPUT in WEEK status] Value is empty string
     
    3939PASS [INPUT in WEEK status] The value is an invalid week string(week is too greater)
    4040PASS [INPUT in WEEK status] The min attribute is less than value attribute
    41 FAIL [INPUT in WEEK status] The value attribute is less than min attribute assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    42 FAIL [INPUT in WEEK status] The value attribute is less than min attribute(Year is 10000 should be valid) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     41PASS [INPUT in WEEK status] The value attribute is less than min attribute
     42PASS [INPUT in WEEK status] The value attribute is less than min attribute(Year is 10000 should be valid)
    4343PASS [INPUT in TIME status] The min attribute is not set
    4444PASS [INPUT in TIME status] Value is empty string
     
    4747PASS [INPUT in TIME status] The min attribute is less than value attribute
    4848PASS [INPUT in TIME status] The time missing second and minute parts is invalid
    49 FAIL [INPUT in TIME status] The value attribute is less than min attribute assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    50 FAIL [INPUT in TIME status] The value is less than min(with millisecond in 1 digit) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    51 FAIL [INPUT in TIME status] The value is less than min(with millisecond in 2 digit) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    52 FAIL [INPUT in TIME status] The value is less than min(with millisecond in 3 digit) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    53 FAIL [INPUT in TIME status] The time missing second part is valid assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     49PASS [INPUT in TIME status] The value attribute is less than min attribute
     50PASS [INPUT in TIME status] The value is less than min(with millisecond in 1 digit)
     51PASS [INPUT in TIME status] The value is less than min(with millisecond in 2 digit)
     52PASS [INPUT in TIME status] The value is less than min(with millisecond in 3 digit)
     53PASS [INPUT in TIME status] The time missing second part is valid
    5454FAIL [INPUT in TIME status] The time is max for reversed range assert_false: The validity.rangeUnderflow should be false. expected false got true
    55 FAIL [INPUT in TIME status] The time is outside the accepted range for reversed range assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     55PASS [INPUT in TIME status] The time is outside the accepted range for reversed range
    5656PASS [INPUT in TIME status] The time is min for reversed range
    5757PASS [INPUT in TIME status] The time is inside the accepted range for reversed range
     
    6262PASS [INPUT in NUMBER status] The min equals to value
    6363PASS [INPUT in NUMBER status] The value is not a number
    64 FAIL [INPUT in NUMBER status] The value is less than min(integer) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    65 FAIL [INPUT in NUMBER status] The value is less than min(floating number) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    66 FAIL [INPUT in NUMBER status] The value is less than min(special floating number) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
    67 FAIL [INPUT in NUMBER status] The value is less than min(scientific notation) assert_true: The validity.rangeUnderflow should be true, when control is disabled. expected true got false
     64PASS [INPUT in NUMBER status] The value is less than min(integer)
     65PASS [INPUT in NUMBER status] The value is less than min(floating number)
     66PASS [INPUT in NUMBER status] The value is less than min(special floating number)
     67PASS [INPUT in NUMBER status] The value is less than min(scientific notation)
    6868
  • trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt

    r267658 r286316  
    33PASS [INPUT in DATE status] The value attibute is empty string
    44PASS [INPUT in DATE status] The value must match the step
    5 FAIL [INPUT in DATE status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     5PASS [INPUT in DATE status] The value must mismatch the step
    66PASS [INPUT in MONTH status] The step attribute is not set
    77PASS [INPUT in MONTH status] The value attibute is empty string
    88PASS [INPUT in MONTH status] The value must match the step
    9 FAIL [INPUT in MONTH status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     9PASS [INPUT in MONTH status] The value must mismatch the step
    1010PASS [INPUT in WEEK status] The step attribute is not set
    1111PASS [INPUT in WEEK status] The value attibute is empty string
    1212PASS [INPUT in WEEK status] The value must match the step
    13 FAIL [INPUT in WEEK status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     13PASS [INPUT in WEEK status] The value must mismatch the step
    1414PASS [INPUT in TIME status] The step attribute is not set
    1515PASS [INPUT in TIME status] The value attibute is empty string
    1616PASS [INPUT in TIME status] The value must match the step
    17 FAIL [INPUT in TIME status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     17PASS [INPUT in TIME status] The value must mismatch the step
    1818PASS [INPUT in DATETIME-LOCAL status] The step attribute is not set
    1919PASS [INPUT in DATETIME-LOCAL status] The value attibute is empty string
    2020PASS [INPUT in DATETIME-LOCAL status] The value must match the step
    21 FAIL [INPUT in DATETIME-LOCAL status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     21PASS [INPUT in DATETIME-LOCAL status] The value must mismatch the step
    2222PASS [INPUT in NUMBER status] The step attribute is not set
    23 FAIL [INPUT in NUMBER status] The step attribute is not set and the value attribute is a floating number assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     23PASS [INPUT in NUMBER status] The step attribute is not set and the value attribute is a floating number
    2424PASS [INPUT in NUMBER status] The value attribute is empty string
    2525PASS [INPUT in NUMBER status] The value must match the step
    26 FAIL [INPUT in NUMBER status] The value must mismatch the step assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     26PASS [INPUT in NUMBER status] The value must mismatch the step
    2727PASS [INPUT in NUMBER status] No step mismatch when step is a floating number and value is its integral multiple
    2828PASS [INPUT in NUMBER status] No step mismatch when step is a floating number in exponent format and value is its integral multiple
    29 FAIL [INPUT in NUMBER status] Step mismatch when step is a very small floating number and value is not its integral multiple assert_true: The validity.stepMismatch should be true, when control is disabled. expected true got false
     29PASS [INPUT in NUMBER status] Step mismatch when step is a very small floating number and value is not its integral multiple
    3030
  • trunk/Source/WebCore/ChangeLog

    r286315 r286316  
     12021-11-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks
     4        https://bugs.webkit.org/show_bug.cgi?id=233604
     5
     6        Reviewed by Darin Adler.
     7
     8        Several WPT tests under html/semantics/forms/constraints are failing due to extraneous willValidate() checks.
     9        Per the specification and to match the behavior of Blink & Gecko, ValidityState properties such as
     10        `validity.typeMismatch` should return true in case of mismatch even if the control is disabled (and thus
     11        willValidate() returns false).
     12
     13        No new tests, rebaselined existing tests.
     14
     15        * html/HTMLInputElement.cpp:
     16        (WebCore::HTMLInputElement::tooShort const):
     17        (WebCore::HTMLInputElement::tooLong const):
     18        (WebCore::HTMLInputElement::typeMismatch const):
     19        (WebCore::HTMLInputElement::hasBadInput const):
     20        (WebCore::HTMLInputElement::rangeUnderflow const):
     21        (WebCore::HTMLInputElement::rangeOverflow const):
     22        (WebCore::HTMLInputElement::stepMismatch const):
     23
    1242021-11-30  Chris Dumez  <cdumez@apple.com>
    225
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r286315 r286316  
    287287bool HTMLInputElement::tooShort() const
    288288{
    289     return willValidate() && tooShort(value(), CheckDirtyFlag);
     289    return tooShort(value(), CheckDirtyFlag);
    290290}
    291291
    292292bool HTMLInputElement::tooLong() const
    293293{
    294     return willValidate() && tooLong(value(), CheckDirtyFlag);
     294    return tooLong(value(), CheckDirtyFlag);
    295295}
    296296
    297297bool HTMLInputElement::typeMismatch() const
    298298{
    299     return willValidate() && m_inputType->typeMismatch();
     299    return m_inputType->typeMismatch();
    300300}
    301301
     
    307307bool HTMLInputElement::hasBadInput() const
    308308{
    309     return willValidate() && m_inputType->hasBadInput();
     309    return m_inputType->hasBadInput();
    310310}
    311311
     
    356356bool HTMLInputElement::rangeUnderflow() const
    357357{
    358     return willValidate() && m_inputType->rangeUnderflow(value());
     358    return m_inputType->rangeUnderflow(value());
    359359}
    360360
    361361bool HTMLInputElement::rangeOverflow() const
    362362{
    363     return willValidate() && m_inputType->rangeOverflow(value());
     363    return m_inputType->rangeOverflow(value());
    364364}
    365365
     
    387387bool HTMLInputElement::stepMismatch() const
    388388{
    389     return willValidate() && m_inputType->stepMismatch(value());
     389    return m_inputType->stepMismatch(value());
    390390}
    391391
Note: See TracChangeset for help on using the changeset viewer.