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

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: Add WebViewHelper for unittests. 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
Index: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
diff --git a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
index 291d6a635757f6e45a65d08d9b72f524dd570889..086b83fc20b4c1b6220c9767caff6b09d0b563f8 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->initializeMainFrame(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)

Powered by Google App Engine
This is Rietveld 408576698