RESOLVED FIXED Bug 95817
[Tests] We should have interactive validation of required value for the "input" element
https://bugs.webkit.org/show_bug.cgi?id=95817
Summary [Tests] We should have interactive validation of required value for the "inpu...
yosin
Reported 2012-09-04 21:58:21 PDT
We should have following test cases for "required" attribute on submit: - No submission occurred when required values aren't presented - Submission occurred when required values are presented and submission data are expected values.
Attachments
Patch 1 (13.57 KB, patch)
2012-09-04 23:37 PDT, yosin
no flags
Patch 2 (13.94 KB, patch)
2012-09-05 00:49 PDT, yosin
no flags
Patch 3 (13.90 KB, patch)
2012-09-05 01:02 PDT, yosin
no flags
yosin
Comment 1 2012-09-04 23:37:41 PDT
yosin
Comment 2 2012-09-04 23:38:26 PDT
Comment on attachment 162166 [details] Patch 1 Could you review this patch? Thanks in advance.
Kent Tamura
Comment 3 2012-09-05 00:24:03 PDT
Comment on attachment 162166 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=162166&action=review > LayoutTests/fast/forms/date/date-interactive-validation-required-expected.txt:1 > +Test interactive validation with required attribute The test result doesn't contain enough information. We should mention that the test checks if an empty required field prevents form submission and checks if a non-empty required field doesn't prevent form submission. > LayoutTests/fast/forms/resources/common-interactive-validation-required.js:32 > + testFailed('Focus should be on test element.'); > + return; Need to call finishJSTest(). > LayoutTests/fast/forms/resources/common-interactive-validation-required.js:38 > + testFailed('The form was not submitted.'); Need to call finishJSTest(). > LayoutTests/fast/forms/resources/common-interactive-validation-required.js:39 > + return; "return" at the end of function makes no sense.
yosin
Comment 4 2012-09-05 00:49:18 PDT
yosin
Comment 5 2012-09-05 00:51:01 PDT
Comment on attachment 162176 [details] Patch 2 Could you review this patch? Thanks in advance. = Changes since the last review = * Update test description in JavaScript. * Add to call finishJSTest() * Remove extra "return" at the end of function.
Kent Tamura
Comment 6 2012-09-05 00:54:36 PDT
Comment on attachment 162176 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=162176&action=review > LayoutTests/fast/forms/resources/common-interactive-validation-required.js:17 > + if (window.testRunner) > + testRunner.notifyDone(); notifyDone() isn't needed. finishJSTest() below does it.
yosin
Comment 7 2012-09-05 01:02:35 PDT
yosin
Comment 8 2012-09-05 01:04:36 PDT
Comment on attachment 162181 [details] Patch 3 Clearing flags on attachment: 162181 Committed r127564: <http://trac.webkit.org/changeset/127564>
yosin
Comment 9 2012-09-05 01:04:41 PDT
All reviewed patches have been landed. Closing bug.
yosin
Comment 10 2012-09-06 01:03:00 PDT
If port doesn't enable interactive validation, please skip these tests.
Note You need to log in before you can comment on or make changes to this bug.