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

Unified Diff: Source/web/tests/WebPageNewSerializerTest.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/WebInputEventConversionTest.cpp ('k') | Source/web/tests/WebPageSerializerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebPageNewSerializerTest.cpp
diff --git a/Source/web/tests/WebPageNewSerializerTest.cpp b/Source/web/tests/WebPageNewSerializerTest.cpp
index 65afbdad3b772c7a1297e9d0b372e9dd847f2a8d..f2f7c0c27d0557572fe462c00514ac0e65730b21 100644
--- a/Source/web/tests/WebPageNewSerializerTest.cpp
+++ b/Source/web/tests/WebPageNewSerializerTest.cpp
@@ -115,6 +115,7 @@ protected:
{
// Create and initialize the WebView.
m_webView = WebView::create(0);
+ m_mainFrame = WebFrame::create(&m_webFrameClient);
// We want the images to load and JavaScript to be on.
WebSettings* settings = m_webView->settings();
@@ -122,13 +123,14 @@ protected:
settings->setLoadsImagesAutomatically(true);
settings->setJavaScriptEnabled(true);
- m_webView->initializeMainFrame(&m_webFrameClient);
+ m_webView->setMainFrame(m_mainFrame);
}
virtual void TearDown()
{
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
m_webView->close();
+ m_mainFrame->close();
}
WebURL setUpCSSTestPage()
@@ -189,6 +191,7 @@ private:
WebString m_pngMimeType;
WebString m_svgMimeType;
TestWebFrameClient m_webFrameClient;
+ WebFrame* m_mainFrame;
};
// Tests that a page with resources and sub-frame is reported with all its resources.
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | Source/web/tests/WebPageSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698