[Forms] Re-factor label.for tests for extending test coverage
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 07:24:42 +0000 (07:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 07:24:42 +0000 (07:24 +0000)
commitd72e90d2be4c2b0ab91c9a5a46160bc136038f52
treec8b7b067976c1218a43cbcc8f830a63b85992354
parent08f824a8d9a0dc71d934f647910b746f704e6924
[Forms] Re-factor label.for tests for extending test coverage
https://bugs.webkit.org/show_bug.cgi?id=80574

Patch by Yosifumi Inoue <yosin@chromium.org> on 2012-03-13
Reviewed by Kent Tamura.

This patch changes label.labels attribute testing with using shared
utility functions, createFormControlDataSet for representing form
related information of HTML5 specification and setupLabelsTeset for
populating test sample dom tree and data set.

This patch extends coverage of existing label.labels test to cover
defined in the specification, labelable-elements.html, and adds
multiple label entries tests, labels-multiple-*.html.

Note: test failure of hidden input type will be fixed by
https://bugs.webkit.org/show_bug.cgi?id=80403

Note: test failure of output element will be fixed by
https://bugs.webkit.org/show_bug.cgi?id=80466

* fast/forms/label/labelable-elements-expected.txt: Added.
* fast/forms/label/labelable-elements.html: Added.
* fast/forms/label/labels-add-htmlFor-label-expected.txt:
* fast/forms/label/labels-add-htmlFor-label.html:
* fast/forms/label/labels-add-parent-label-expected.txt:
* fast/forms/label/labels-add-parent-label.html:
* fast/forms/label/labels-change-htmlFor-attribute-expected.txt:
* fast/forms/label/labels-change-htmlFor-attribute.html:
* fast/forms/label/labels-multiple-sibling-labels-expected.txt: Added.
* fast/forms/label/labels-multiple-sibling-labels.html: Added.
* fast/forms/label/labels-parent-and-sibling-labels-expected.txt: Added.
* fast/forms/label/labels-parent-and-sibling-labels.html: Added.
* fast/forms/label/labels-remove-htmlFor-attribute-expected.txt:
* fast/forms/label/labels-remove-htmlFor-attribute.html:
* fast/forms/label/labels-remove-htmlFor-label-expected.txt:
* fast/forms/label/labels-remove-htmlFor-label.html:
* fast/forms/label/labels-remove-parent-label-expected.txt:
* fast/forms/label/labels-remove-parent-label.html:
* fast/forms/label/labels-set-htmlFor-attribute-expected.txt:
* fast/forms/label/labels-set-htmlFor-attribute.html:
* fast/forms/resources/common.js:
(createFormControlDataSet): Returns form control data set for providing
labelable elements and supported elements information.
* fast/forms/resources/label-test-util.js: Added.
(setupLabelsTest.return.dataSet.dataSet.getLabelableElementData):
(setupLabelsTest): Populate dom tree for unit tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/label/labelable-elements-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/label/labelable-elements.html [new file with mode: 0644]
LayoutTests/fast/forms/label/labels-add-htmlFor-label-expected.txt
LayoutTests/fast/forms/label/labels-add-htmlFor-label.html
LayoutTests/fast/forms/label/labels-add-parent-label-expected.txt
LayoutTests/fast/forms/label/labels-add-parent-label.html
LayoutTests/fast/forms/label/labels-change-htmlFor-attribute-expected.txt
LayoutTests/fast/forms/label/labels-change-htmlFor-attribute.html
LayoutTests/fast/forms/label/labels-multiple-sibling-labels-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/label/labels-multiple-sibling-labels.html [new file with mode: 0644]
LayoutTests/fast/forms/label/labels-parent-and-sibling-labels-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/label/labels-parent-and-sibling-labels.html [new file with mode: 0644]
LayoutTests/fast/forms/label/labels-remove-htmlFor-attribute-expected.txt
LayoutTests/fast/forms/label/labels-remove-htmlFor-attribute.html
LayoutTests/fast/forms/label/labels-remove-htmlFor-label-expected.txt
LayoutTests/fast/forms/label/labels-remove-htmlFor-label.html
LayoutTests/fast/forms/label/labels-remove-parent-label-expected.txt
LayoutTests/fast/forms/label/labels-remove-parent-label.html
LayoutTests/fast/forms/label/labels-set-htmlFor-attribute-expected.txt
LayoutTests/fast/forms/label/labels-set-htmlFor-attribute.html
LayoutTests/fast/forms/resources/common.js
LayoutTests/fast/forms/resources/label-test-util.js [new file with mode: 0644]