Fix <rdar://5133816> keepWebHistory is not implemented
[WebKit-https.git] / WebKitTools / DumpRenderTree / win / LayoutTestControllerWin.cpp
index 79e37279c73391ca6089bf470339c2941e3454c8..d4187c5372694b93d363648d781a65b13623bec3 100644 (file)
@@ -40,7 +40,9 @@
 #include <JavaScriptCore/Assertions.h>
 #include <JavaScriptCore/JavaScriptCore.h>
 #include <JavaScriptCore/JSRetainPtr.h>
 #include <JavaScriptCore/Assertions.h>
 #include <JavaScriptCore/JavaScriptCore.h>
 #include <JavaScriptCore/JSRetainPtr.h>
+#include <WebKit/IWebHistory.h>
 #include <WebKit/IWebViewPrivate.h>
 #include <WebKit/IWebViewPrivate.h>
+#include <WebKit/WebKit.h>
 #include <string>
 #include <CoreFoundation/CoreFoundation.h>
 
 #include <string>
 #include <CoreFoundation/CoreFoundation.h>
 
@@ -120,7 +122,15 @@ void LayoutTestController::display()
 
 void LayoutTestController::keepWebHistory()
 {
 
 void LayoutTestController::keepWebHistory()
 {
-    // FIXME: Implement!
+    COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
+    if (!history)
+        return;
+
+    COMPtr<IWebHistory> sharedHistory(Create, CLSID_WebHistory);
+    if (!sharedHistory)
+        return;
+
+    history->setOptionalSharedHistory(sharedHistory.get());
 }
 
 void LayoutTestController::notifyDone()
 }
 
 void LayoutTestController::notifyDone()