[iOS] [Datalist] fast/forms/datalist/datalist-show-hide.html fails
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2018 20:12:07 +0000 (20:12 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Oct 2018 20:12:07 +0000 (20:12 +0000)
commit898a1581474036d7e7e11c6a16a6e634af940f69
treed84eda943da9f67b60cd8faf96da42b9a7f288a0
parentfaa803687caec43c47af4f559590b16074fb3f0a
[iOS] [Datalist] fast/forms/datalist/datalist-show-hide.html fails
https://bugs.webkit.org/show_bug.cgi?id=190777

Reviewed by Tim Horton.

Tools:

Implement isShowingDataListSuggestions on iOS. See below for more details.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::isShowingDataListSuggestions const):

Add a stub implementation for DumpRenderTree.

* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::isShowingDataListSuggestions const):

Move this stub implementation to !PLATFORM(COCOA).

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::forEachViewInHierarchy):

Add a helper function to apply a given function to a UIView and each of its subviews, recursively.

(WTR::UIScriptController::isShowingDataListSuggestions const):

For iOS, return whether the UIRemoteKeyboardWindow contains a subview of type WKDataListSuggestionsPickerView.

LayoutTests:

Refactor this test such that it passes on both iOS and macOS. This test verifies that datalist suggestions menu
UI can be shown and hidden. On macOS, we focus and then blur the input field; on iOS, we tap in the datalist
button to show the suggestions UI, and then tap in the text field to bring back the regular keyboard.

* fast/forms/datalist/datalist-show-hide-expected.txt:
* fast/forms/datalist/datalist-show-hide.html:
* platform/ios/TestExpectations:

Unskip the layout test on iOS.

* resources/ui-helper.js:
(window.UIHelper.isShowingDataListSuggestions):

Tweak this helper function to resolve with either true or false (Boolean types), instead of the strings "true"
and "false".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/datalist/datalist-show-hide-expected.txt
LayoutTests/fast/forms/datalist/datalist-show-hide.html
LayoutTests/platform/ios/TestExpectations
LayoutTests/resources/ui-helper.js
Tools/ChangeLog
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm