haikuwebkit/LayoutTests/fast/forms/scroll-into-view-and-show-v...

12 lines
279 B
Plaintext
Raw Permalink Normal View History

HTML form validation bubble disappears https://bugs.webkit.org/show_bug.cgi?id=191418 Reviewed by Simon Fraser. Source/WebCore: If we validate a form and find an invalid form control, we'll scroll it into view and show the validation bubble. However, scrolling the element into view may be an asynchronous operation, in which case it would discard the validation bubble prematurely because scrolling hides the validation bubble. To address the issue, we now show the validation message asynchronously after focusing the element (and potentially scrolling it into view). Test: fast/forms/scroll-into-view-and-show-validation-message.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::focusAndShowValidationMessage): LayoutTests: Add API test coverage and update existing tests to use form-validation.js and avoid code duplication. * fast/forms/form-validation.js: Added. (getValidationBubbleContents): (getValidationBubble.return.new.Promise.): (getValidationBubble): * fast/forms/ios/validation-bubble-dismiss-on-tap-expected.txt: * fast/forms/ios/validation-bubble-dismiss-on-tap.html: * fast/forms/navigation-dismisses-validation-bubbles-expected.txt: Renamed from LayoutTests/http/tests/navigation/navigation-dismisses-validation-bubbles-expected.txt. * fast/forms/navigation-dismisses-validation-bubbles.html: Renamed from LayoutTests/http/tests/navigation/navigation-dismisses-validation-bubbles.html. * fast/forms/resources/check-validation-bubble-not-visible.html: Renamed from LayoutTests/http/tests/navigation/resources/check-validation-bubble-not-visible.html. * fast/forms/scroll-into-view-and-show-validation-message-expected.txt: Added. * fast/forms/scroll-into-view-and-show-validation-message.html: Added. * fast/forms/validation-bubble-disappears-when-input-detached-expected.txt: * fast/forms/validation-bubble-disappears-when-input-detached.html: * fast/forms/validation-bubble-disappears-when-input-moved-expected.txt: * fast/forms/validation-bubble-disappears-when-input-moved.html: * fast/forms/validation-bubble-disappears-when-input-no-longer-visible-expected.txt: * fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html: * fast/forms/validation-bubble-escape-key-dismiss-expected.txt: * fast/forms/validation-bubble-escape-key-dismiss.html: * fast/forms/validation-custom-message-expected.txt: * fast/forms/validation-custom-message.html: * fast/forms/validation-message-detached-iframe-expected.txt: * fast/forms/validation-message-detached-iframe.html: * fast/forms/validation-message-detached-iframe2-expected.txt: * fast/forms/validation-message-detached-iframe2.html: * fast/forms/validation-message-minimum-font-size-expected.txt: * fast/forms/validation-message-minimum-font-size.html: * fast/forms/validation-messages-expected.txt: * fast/forms/validation-messages.html: * platform/gtk/TestExpectations: * platform/ios-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/206252@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-09 17:37:52 +00:00
Tests that the validation bubble is shown even if the invalid field needs to be scrolled into view.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS message is "Fill out this field"
PASS successfullyParsed is true
TEST COMPLETE
Submit