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

Unified Diff: Source/web/tests/ScrollingCoordinatorChromiumTest.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/RenderTableRowTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
diff --git a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
index 0a5e9b8a3747711abf618deb912ceec9412fe12c..0f0662b9c6ca5ac5c898bdc67d30b35a9951b18c 100644
--- a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
+++ b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
@@ -76,6 +76,7 @@ public:
{
// We cannot reuse FrameTestHelpers::createWebViewAndLoad here because the compositing
// settings need to be set before the page is loaded.
+ m_mainFrame = WebFrame::create(&m_mockWebFrameClient);
m_webViewImpl = toWebViewImpl(WebView::create(&m_mockWebViewClient));
m_webViewImpl->settings()->setJavaScriptEnabled(true);
m_webViewImpl->settings()->setForceCompositingMode(true);
@@ -85,7 +86,7 @@ public:
m_webViewImpl->settings()->setAcceleratedCompositingForScrollableFramesEnabled(true);
m_webViewImpl->settings()->setCompositedScrollingForFramesEnabled(true);
m_webViewImpl->settings()->setFixedPositionCreatesStackingContext(true);
- m_webViewImpl->initializeMainFrame(&m_mockWebFrameClient);
+ m_webViewImpl->setMainFrame(m_mainFrame);
m_webViewImpl->resize(IntSize(320, 240));
}
@@ -93,6 +94,7 @@ public:
{
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
m_webViewImpl->close();
+ m_mainFrame->close();
}
void navigateTo(const std::string& url)
@@ -121,6 +123,7 @@ protected:
MockWebFrameClient m_mockWebFrameClient;
FakeWebViewClient m_mockWebViewClient;
WebViewImpl* m_webViewImpl;
+ WebFrame* m_mainFrame;
};
TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingByDefault)
« no previous file with comments | « Source/web/tests/RenderTableRowTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698