Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: Source/web/tests/FrameTestHelpers.cpp

Issue 1052993006: Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor test cleanup Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/PinchViewportTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/FrameTestHelpers.cpp
diff --git a/Source/web/tests/FrameTestHelpers.cpp b/Source/web/tests/FrameTestHelpers.cpp
index 9c278750566274d261444fe66b79f38832e1f33b..c2cf8433db4bf28e3a3ab1215068d14bc03adaf7 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());
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/PinchViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698