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

Unified Diff: Source/web/tests/ChromeClientImplTest.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/AssociatedURLLoaderTest.cpp ('k') | Source/web/tests/CustomEventTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ChromeClientImplTest.cpp
diff --git a/Source/web/tests/ChromeClientImplTest.cpp b/Source/web/tests/ChromeClientImplTest.cpp
index 4d62f9ed570a892ea0d7744c1e7bb0449a277671..5e1b4652de65a5b262811e6b635a5dcc8df5d05a 100644
--- a/Source/web/tests/ChromeClientImplTest.cpp
+++ b/Source/web/tests/ChromeClientImplTest.cpp
@@ -30,6 +30,7 @@
#include "config.h"
+#include "WebFrame.h"
#include "WebFrameClient.h"
#include "WebInputEvent.h"
#include "WebView.h"
@@ -87,7 +88,8 @@ protected:
virtual void SetUp()
{
m_webView = toWebViewImpl(WebView::create(&m_webViewClient));
- m_webView->initializeMainFrame(&m_webFrameClient);
+ m_mainFrame = WebFrame::create(&m_webFrameClient);
+ m_webView->setMainFrame(m_mainFrame);
m_chromeClientImpl = static_cast<ChromeClientImpl*>(&m_webView->page()->chrome().client());
m_result = WebNavigationPolicyIgnore;
}
@@ -95,6 +97,7 @@ protected:
virtual void TearDown()
{
m_webView->close();
+ m_mainFrame->close();
}
WebNavigationPolicy getNavigationPolicyWithMouseEvent(int modifiers, WebMouseEvent::Button button, bool asPopup)
@@ -120,6 +123,7 @@ protected:
WebNavigationPolicy m_result;
TestWebViewClient m_webViewClient;
WebViewImpl* m_webView;
+ WebFrame* m_mainFrame;
TestWebFrameClient m_webFrameClient;
ChromeClientImpl* m_chromeClientImpl;
};
« no previous file with comments | « Source/web/tests/AssociatedURLLoaderTest.cpp ('k') | Source/web/tests/CustomEventTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698