Bug 95817 - [Tests] We should have interactive validation of required value for the "input" element
Summary: [Tests] We should have interactive validation of required value for the "inpu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: yosin
URL:
Keywords:
Depends on: 95936
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-04 21:58 PDT by yosin
Modified: 2012-09-06 01:03 PDT (History)
1 user (show)

See Also:


Attachments
Patch 1 (13.57 KB, patch)
2012-09-04 23:37 PDT, yosin
no flags Details | Formatted Diff | Diff
Patch 2 (13.94 KB, patch)
2012-09-05 00:49 PDT, yosin
no flags Details | Formatted Diff | Diff
Patch 3 (13.90 KB, patch)
2012-09-05 01:02 PDT, yosin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yosin 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.
Comment 1 yosin 2012-09-04 23:37:41 PDT
Created attachment 162166 [details]
Patch 1
Comment 2 yosin 2012-09-04 23:38:26 PDT
Comment on attachment 162166 [details]
Patch 1

Could you review this patch?
Thanks in advance.
Comment 3 Kent Tamura 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.
Comment 4 yosin 2012-09-05 00:49:18 PDT
Created attachment 162176 [details]
Patch 2
Comment 5 yosin 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.
Comment 6 Kent Tamura 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.
Comment 7 yosin 2012-09-05 01:02:35 PDT
Created attachment 162181 [details]
Patch 3
Comment 8 yosin 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>
Comment 9 yosin 2012-09-05 01:04:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 yosin 2012-09-06 01:03:00 PDT
If port doesn't enable interactive validation, please skip these tests.