summaryrefslogtreecommitdiffstats
path: root/Tools/TestWebKitAPI/InjectedBundleController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/TestWebKitAPI/InjectedBundleController.cpp')
-rw-r--r--Tools/TestWebKitAPI/InjectedBundleController.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/Tools/TestWebKitAPI/InjectedBundleController.cpp b/Tools/TestWebKitAPI/InjectedBundleController.cpp
index fb78013ee..53f39a874 100644
--- a/Tools/TestWebKitAPI/InjectedBundleController.cpp
+++ b/Tools/TestWebKitAPI/InjectedBundleController.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if WK_HAVE_C_SPI
+
#include "InjectedBundleController.h"
#include "InjectedBundleTest.h"
@@ -33,7 +36,7 @@
namespace TestWebKitAPI {
-InjectedBundleController& InjectedBundleController::shared()
+InjectedBundleController& InjectedBundleController::singleton()
{
static InjectedBundleController& shared = *new InjectedBundleController;
return shared;
@@ -54,16 +57,15 @@ void InjectedBundleController::initialize(WKBundleRef bundle, WKTypeRef initiali
if (!initializationUserData)
return;
- WKBundleClient client = {
- 0,
- this,
+ WKBundleClientV1 client = {
+ { 0, this },
didCreatePage,
willDestroyPage,
didInitializePageGroup,
didReceiveMessage,
didReceiveMessageToPage
};
- WKBundleSetClient(m_bundle, &client);
+ WKBundleSetClient(m_bundle, &client.base);
// Initialize the test from the "initializationUserData".
@@ -139,3 +141,5 @@ void InjectedBundleController::registerCreateInjectedBundleTestFunction(const st
}
} // namespace TestWebKitAPI
+
+#endif