Add test and infrastructure for link popover
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 01:08:25 +0000 (01:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 01:08:25 +0000 (01:08 +0000)
commite489bdc9cb71cfa6173a195d0aaf5d39ea3a835d
tree064d3fa57fa9e3adbf52788152eddf8f143f4792
parent460c039558a6655d42fff82984be805f4b8a6e3a
Add test and infrastructure for link popover
https://bugs.webkit.org/show_bug.cgi?id=163406

Patch by Megan Gardner <megan_gardner@apple.com> on 2016-10-17
Reviewed by Simon Fraser.

Source/WebKit2:

Add infrastructure to see when a link popover appears, and what URL it has loaded.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didShowForcePressPreview]):
(-[WKWebView didDismissForcePressPreview]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemControllerDidCancelPreview:]):

Tools:

Added functionality test for link popovers.
Can query for what URL is loaded, and that the popover has appeared or has
been dismissed.
Added a link popover test.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptContext.h:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setDidShowForcePressPreviewCallback):
(WTR::UIScriptController::didShowForcePressPreviewCallback):
(WTR::UIScriptController::setDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didEndFormControlInteractionCallback): Deleted.
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView didShowForcePressPreview]):
(-[TestRunnerWKWebView didDismissForcePressPreview]):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.

LayoutTests:

* fast/events/touch/ios/iphone7/force-press-on-link-expected.txt: Added.
* fast/events/touch/ios/iphone7/force-press-on-link.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Tools/ChangeLog
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h
Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm