From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp') diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp index 783aebe7a..906ff05b7 100644 --- a/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp +++ b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp @@ -24,11 +24,14 @@ */ #include "config.h" + +#if WK_HAVE_C_SPI + #include "InjectedBundleTest.h" #include "PlatformUtilities.h" -#include -#include +#include +#include namespace TestWebKitAPI { @@ -47,7 +50,7 @@ private: WKDictionarySetItem(messageBody.get(), Util::toWK("URLRequestReturn").get(), request); WKDictionarySetItem(messageBody.get(), Util::toWK("UserDataReturn").get(), userData); - WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("WillLoadURLRequestReturn").get(), messageBody.get()); + WKBundlePostMessage(InjectedBundleController::singleton().bundle(), Util::toWK("WillLoadURLRequestReturn").get(), messageBody.get()); } static void willLoadDataRequest(WKBundlePageRef page, WKURLRequestRef request, WKDataRef data, WKStringRef MIMEType, WKStringRef encodingName, WKURLRef unreachableURL, WKTypeRef userData, const void *clientInfo) @@ -61,11 +64,11 @@ private: WKDictionarySetItem(messageBody.get(), Util::toWK("UnreachableURLReturn").get(), unreachableURL); WKDictionarySetItem(messageBody.get(), Util::toWK("UserDataReturn").get(), userData); - WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("WillLoadDataRequestReturn").get(), messageBody.get()); + WKBundlePostMessage(InjectedBundleController::singleton().bundle(), Util::toWK("WillLoadDataRequestReturn").get(), messageBody.get()); } - virtual void didCreatePage(WKBundleRef, WKBundlePageRef bundlePage) override + void didCreatePage(WKBundleRef, WKBundlePageRef bundlePage) override { WKBundlePageLoaderClientV6 pageLoaderClient; memset(&pageLoaderClient, 0, sizeof(pageLoaderClient)); @@ -82,3 +85,5 @@ private: static InjectedBundleTest::Register registrar("WillLoadTest"); } // namespace TestWebKitAPI + +#endif -- cgit v1.2.1