diff options
author | Steve Block <steveblock@google.com> | 2011-05-18 13:36:51 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-24 15:38:28 +0100 |
commit | 2fc2651226baac27029e38c9d6ef883fa32084db (patch) | |
tree | e396d4bf89dcce6ed02071be66212495b1df1dec /Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp | |
parent | b3725cedeb43722b3b175aaeff70552e562d2c94 (diff) | |
download | external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2 |
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp')
-rw-r--r-- | Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp | 30 |
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 |