Add an API test to guard against regressions while re-entering setDefersLoading:.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 03:09:19 +0000 (03:09 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 03:09:19 +0000 (03:09 +0000)
commit78d0572197ea1ecf2d576bcaee3e5c48746bc308
tree3ff196800c6dbbecfe4738d2de6303684f6425fd
parent1a13379a6c510629901d8e979eb56b2a4ce46872
Add an API test to guard against regressions while re-entering setDefersLoading:.
<rdar://problem/37033737> and https://bugs.webkit.org/show_bug.cgi?id=185630

Reviewed by Chris Dumez.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setDefersLoadingForTesting:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDefersLoadingForTesting):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: Added.
(-[DoubleDefersNavigationDelegate _webView:navigation:didSameDocumentNavigation:]):
(-[DoubleDefersNavigationDelegate webView:didFinishNavigation:]):
(-[DefersScheme initWithBytes:]):
(-[DefersScheme webView:startURLSchemeTask:]):
(-[DefersScheme webView:stopURLSchemeTask:]):
* TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoadingPlugin.mm: Added.
(-[DoubleDefersLoadingPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[DoubleDefersLoadingPlugIn webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:]):
(-[DoubleDefersLoadingPlugIn dealloc]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoadingPlugin.mm [new file with mode: 0644]