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

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

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix lifetime on frame detach Created 7 years, 3 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/CustomEventTest.cpp ('k') | Source/web/tests/FrameTestHelpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/FrameLoaderClientImplTest.cpp
diff --git a/Source/web/tests/FrameLoaderClientImplTest.cpp b/Source/web/tests/FrameLoaderClientImplTest.cpp
index 85c4332428d4142564b781aaa817b9baf6cf293c..1c52cb4a0b2294e35577b08d48cb31076042ca14 100644
--- a/Source/web/tests/FrameLoaderClientImplTest.cpp
+++ b/Source/web/tests/FrameLoaderClientImplTest.cpp
@@ -69,13 +69,15 @@ public:
void SetUp()
{
m_webView = WebView::create(0);
- m_webView->initializeMainFrame(&m_webFrameClient);
+ m_mainFrame = WebFrame::create(&m_webFrameClient);
+ m_webView->setMainFrame(m_mainFrame);
m_frameLoaderClientImpl = static_cast<FrameLoaderClientImpl*>(toWebFrameImpl(m_webView->mainFrame())->frame()->loader()->client());
}
void TearDown()
{
m_webView->close();
+ m_mainFrame->close();
}
void setUserAgentOverride(const WebString& userAgent)
@@ -95,6 +97,7 @@ protected:
TestWebFrameClient m_webFrameClient;
FrameLoaderClientImpl* m_frameLoaderClientImpl;
WebView* m_webView;
+ WebFrame* m_mainFrame;
};
TEST_F(FrameLoaderClientImplTest, UserAgentOverride)
« no previous file with comments | « Source/web/tests/CustomEventTest.cpp ('k') | Source/web/tests/FrameTestHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698