summaryrefslogtreecommitdiffstats
path: root/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp')
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index 13c7b10..4707ed8 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -32,6 +32,7 @@
#include <WebKit2/WKBundleBackForwardList.h>
#include <WebKit2/WKBundleFrame.h>
#include <WebKit2/WKBundleFramePrivate.h>
+#include <WebKit2/WKBundleInspector.h>
#include <WebKit2/WKBundlePagePrivate.h>
#include <WebKit2/WKBundleScriptWorld.h>
#include <WebKit2/WKBundlePrivate.h>
@@ -96,6 +97,7 @@ LayoutTestController::LayoutTestController()
, m_waitToDump(false)
, m_testRepaint(false)
, m_testRepaintSweepHorizontally(false)
+ , m_willSendRequestReturnsNull(false)
{
platformInitialize();
}
@@ -309,6 +311,27 @@ void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef wi
setProperty(context, windowObject, "layoutTestController", this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}
+void LayoutTestController::showWebInspector()
+{
+ WKBundleInspectorShow(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
+}
+
+void LayoutTestController::closeWebInspector()
+{
+ WKBundleInspectorClose(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
+}
+
+void LayoutTestController::evaluateInWebInspector(long callID, JSStringRef script)
+{
+ WKRetainPtr<WKStringRef> scriptWK = toWK(script);
+ WKBundleInspectorEvaluateScriptForTest(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), callID, scriptWK.get());
+}
+
+void LayoutTestController::setTimelineProfilingEnabled(bool enabled)
+{
+ WKBundleInspectorSetPageProfilingEnabled(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), enabled);
+}
+
typedef WTF::HashMap<unsigned, WKRetainPtr<WKBundleScriptWorldRef> > WorldMap;
static WorldMap& worldMap()
{
@@ -349,4 +372,11 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(JSContextRef context, u
JSEvaluateScript(jsContext, script, 0, 0, 0, 0);
}
+void LayoutTestController::setPOSIXLocale(JSStringRef locale)
+{
+ char localeBuf[32];
+ JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf));
+ setlocale(LC_ALL, localeBuf);
+}
+
} // namespace WTR