Index: Source/web/tests/FrameTestHelpers.cpp |
diff --git a/Source/web/tests/FrameTestHelpers.cpp b/Source/web/tests/FrameTestHelpers.cpp |
index b54cefe5a22fcaf1a2af90494c0fd1657a7a42ef..54f33cd0c774db520b5d22bf4581c3763b60aa7e 100644 |
--- a/Source/web/tests/FrameTestHelpers.cpp |
+++ b/Source/web/tests/FrameTestHelpers.cpp |
@@ -40,6 +40,7 @@ |
#include "public/platform/WebURLRequest.h" |
#include "public/platform/WebURLResponse.h" |
#include "public/platform/WebUnitTestSupport.h" |
+#include "public/web/WebRemoteFrame.h" |
#include "public/web/WebSettings.h" |
#include "public/web/WebViewClient.h" |
#include "web/WebLocalFrameImpl.h" |
@@ -320,6 +321,18 @@ void TestWebFrameClient::waitForLoadToComplete() |
} |
} |
+TestWebRemoteFrameClient::TestWebRemoteFrameClient() |
+ : m_frame(WebRemoteFrame::create(this)) |
+{ |
+} |
+ |
+void TestWebRemoteFrameClient::frameDetached() |
+{ |
+ if (m_frame->parent()) |
+ m_frame->parent()->removeChild(m_frame); |
+ m_frame->close(); |
+} |
+ |
void TestWebViewClient::initializeLayerTreeView() |
{ |
m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting()); |