X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=WebKitTools%2FWebKitTestRunner%2FInjectedBundle%2FLayoutTestController.cpp;h=e828c46a6230b0447171a4a765365b3c25693b9c;hb=e14391e94c850b8bd03680c23b38978db68687a8;hp=f8cbd4f64c08007ba9076693d9953c29e713ba3c;hpb=bb4e47ff1787cdc64a103783868664f5452274b3;p=android-x86%2Fexternal-webkit.git diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp index f8cbd4f64..e828c46a6 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp @@ -29,6 +29,7 @@ #include "InjectedBundlePage.h" #include "JSLayoutTestController.h" #include "StringFunctions.h" +#include #include #include #include @@ -85,6 +86,7 @@ PassRefPtr LayoutTestController::create() LayoutTestController::LayoutTestController() : m_whatToDump(RenderTree) , m_shouldDumpAllFrameScrollPositions(false) + , m_shouldDumpBackForwardListsForAllWindows(false) , m_shouldAllowEditing(true) , m_shouldCloseExtraWindows(false) , m_dumpEditingCallbacks(false) @@ -148,6 +150,13 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time); } +JSRetainPtr LayoutTestController::layerTreeAsText() const +{ + WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page()); + WKRetainPtr text(AdoptWK, WKBundleFrameCopyLayerTreeAsText(mainFrame)); + return toJS(text); +} + void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames) { WKRetainPtr sourceWK = toWK(source); @@ -233,6 +242,11 @@ unsigned LayoutTestController::windowCount() return InjectedBundle::shared().pageCount(); } +void LayoutTestController::clearBackForwardList() +{ + WKBundleBackForwardListClear(WKBundlePageGetBackForwardList(InjectedBundle::shared().page()->page())); +} + // Object Creation void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)