Add basic layout test coverage for File Picker on iOS
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 23:24:35 +0000 (23:24 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 23:24:35 +0000 (23:24 +0000)
commit0735e8bab9a45d26d6ee3ad4467c7e08722cb0b7
treebd55dbfa1659a12faa0f856792fbd7b5b0706460
parent0ac19794776aad5030a59278e05394c6e779ec8a
Add basic layout test coverage for File Picker on iOS
https://bugs.webkit.org/show_bug.cgi?id=196265

Reviewed by Wenson Hsieh.

Source/WebKit:

Add layout test infrastructure to test the file picker on iOS.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _dismissFilePicker]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dismissFilePicker]):
(-[WKContentView _contentsOfUserInterfaceItem:]):
* UIProcess/ios/forms/WKFileUploadPanel.h:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel currentAvailableActionTitles]):

Tools:

Add layout test infrastructure to test the file picker on iOS.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::dismissFilePicker):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::dismissFilePicker):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(overridePresentViewController):
(WTR::TestController::platformInitialize):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::dismissFilePicker):

LayoutTests:

Add new layout test.

* fast/forms/ios/file-upload-panel-expected.txt: Added.
* fast/forms/ios/file-upload-panel.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/ios/file-upload-panel-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/ios/file-upload-panel.html [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.h
Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
Tools/ChangeLog
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestOptions.h
Tools/WebKitTestRunner/ios/TestControllerIOS.mm
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm