haikuwebkit/LayoutTests/fast/forms/validation-custom-message-e...

12 lines
329 B
Plaintext
Raw Permalink Normal View History

Required text input:
Tests that the custom validation message set by JavaScript is displayed on UI side.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
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
PASS message is "This is a custom validity message."
PASS message is "Fill out this field"
PASS successfullyParsed is true
TEST COMPLETE
Make sure HTML validation bubble's state is updated after layout https://bugs.webkit.org/show_bug.cgi?id=165922 <rdar://problem/29694730> Reviewed by Simon Fraser. Source/WebCore: Make sure HTML validation bubble's state is updated after layout. In particular, if the validation bubble's associated element has moved or is no longer visible, we now hide the bubble. Tests: fast/forms/validation-bubble-disappears-when-input-detached.html fast/forms/validation-bubble-disappears-when-input-moved.html fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html * page/FrameView.cpp: (WebCore::FrameView::viewportContentsChanged): * page/Page.cpp: (WebCore::Page::updateValidationBubbleStateIfNeeded): * page/Page.h: * page/ValidationMessageClient.h: Source/WebKit/mac: Make sure HTML validation bubble's state is updated after layout. In particular, if the validation bubble's associated element has moved or is no longer visible, we now hide the bubble. * WebCoreSupport/WebValidationMessageClient.h: * WebCoreSupport/WebValidationMessageClient.mm: (WebValidationMessageClient::showValidationMessage): (WebValidationMessageClient::hideValidationMessage): (WebValidationMessageClient::updateValidationBubbleStateIfNeeded): Source/WebKit2: Make sure HTML validation bubble's state is updated after layout. In particular, if the validation bubble's associated element has moved or is no longer visible, we now hide the bubble. * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: (WebKit::WebValidationMessageClient::showValidationMessage): (WebKit::WebValidationMessageClient::hideValidationMessage): (WebKit::WebValidationMessageClient::updateValidationBubbleStateIfNeeded): * WebProcess/WebCoreSupport/WebValidationMessageClient.h: LayoutTests: Add several layout tests to cover this. * fast/forms/validation-bubble-disappears-when-input-detached-expected.txt: Added. * fast/forms/validation-bubble-disappears-when-input-detached.html: Added. * fast/forms/validation-bubble-disappears-when-input-moved-expected.txt: Added. * fast/forms/validation-bubble-disappears-when-input-moved.html: Added. * fast/forms/validation-bubble-disappears-when-input-no-longer-visible-expected.txt: Added. * fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html: Added. Canonical link: https://commits.webkit.org/183539@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-16 03:14:52 +00:00