Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
input.showPicker() should throw when input is readonly/disabled
https://bugs.webkit.org/show_bug.cgi?id=240302 Reviewed by Tim Nguyen. LayoutTests/imported/w3c: * web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly-expected.txt: Added. * web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly.html: Added. Source/WebCore: When input is readonly or disabled, input.showPicker() should throw InvalidStateError. Test: imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-disabled-readonly.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::showPicker): Canonical link: https://commits.webkit.org/250532@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
4 changed files
with
72 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -1,46 +1,46 @@ | ||
|
|
||
| FAIL input[type=button] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=checkbox] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=color] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=date] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=datetime-local] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=email] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=file] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=hidden] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=image] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=month] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=number] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=password] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=radio] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=range] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=reset] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=search] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=submit] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=tel] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=text] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=time] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=url] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=week] showPicker() throws when disabled assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| PASS input[type=button] showPicker() doesn't throw when readonly | ||
| PASS input[type=checkbox] showPicker() doesn't throw when readonly | ||
| PASS input[type=color] showPicker() doesn't throw when readonly | ||
| FAIL input[type=date] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=datetime-local] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=email] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| PASS input[type=file] showPicker() doesn't throw when readonly | ||
| PASS input[type=hidden] showPicker() doesn't throw when readonly | ||
| PASS input[type=image] showPicker() doesn't throw when readonly | ||
| FAIL input[type=month] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=number] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=password] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| PASS input[type=radio] showPicker() doesn't throw when readonly | ||
| PASS input[type=range] showPicker() doesn't throw when readonly | ||
| PASS input[type=reset] showPicker() doesn't throw when readonly | ||
| FAIL input[type=search] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| PASS input[type=submit] showPicker() doesn't throw when readonly | ||
| FAIL input[type=tel] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=text] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=time] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=url] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| FAIL input[type=week] showPicker() throws when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "NotAllowedError: Input showPicker() requires a user gesture." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11 | ||
| PASS input[type=button] showPicker() throws when disabled | ||
| PASS input[type=checkbox] showPicker() throws when disabled | ||
| PASS input[type=color] showPicker() throws when disabled | ||
| PASS input[type=date] showPicker() throws when disabled | ||
| PASS input[type=datetime-local] showPicker() throws when disabled | ||
| PASS input[type=email] showPicker() throws when disabled | ||
| PASS input[type=file] showPicker() throws when disabled | ||
| PASS input[type=hidden] showPicker() throws when disabled | ||
| PASS input[type=image] showPicker() throws when disabled | ||
| PASS input[type=month] showPicker() throws when disabled | ||
| PASS input[type=number] showPicker() throws when disabled | ||
| PASS input[type=password] showPicker() throws when disabled | ||
| PASS input[type=radio] showPicker() throws when disabled | ||
| PASS input[type=range] showPicker() throws when disabled | ||
| PASS input[type=reset] showPicker() throws when disabled | ||
| PASS input[type=search] showPicker() throws when disabled | ||
| PASS input[type=submit] showPicker() throws when disabled | ||
| PASS input[type=tel] showPicker() throws when disabled | ||
| PASS input[type=text] showPicker() throws when disabled | ||
| PASS input[type=time] showPicker() throws when disabled | ||
| PASS input[type=url] showPicker() throws when disabled | ||
| PASS input[type=week] showPicker() throws when disabled | ||
| FAIL input[type=button] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=checkbox] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=color] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| PASS input[type=date] showPicker() throws when readonly | ||
| PASS input[type=datetime-local] showPicker() throws when readonly | ||
| PASS input[type=email] showPicker() throws when readonly | ||
| FAIL input[type=file] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=hidden] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=image] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| PASS input[type=month] showPicker() throws when readonly | ||
| PASS input[type=number] showPicker() throws when readonly | ||
| PASS input[type=password] showPicker() throws when readonly | ||
| FAIL input[type=radio] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=range] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| FAIL input[type=reset] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| PASS input[type=search] showPicker() throws when readonly | ||
| FAIL input[type=submit] showPicker() doesn't throw when readonly assert_throws_dom: function "() => { input.showPicker(); }" threw object "InvalidStateError: Input showPicker() cannot be used on immutable controls." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0 | ||
| PASS input[type=tel] showPicker() throws when readonly | ||
| PASS input[type=text] showPicker() throws when readonly | ||
| PASS input[type=time] showPicker() throws when readonly | ||
| PASS input[type=url] showPicker() throws when readonly | ||
| PASS input[type=week] showPicker() throws when readonly | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters