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

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

Issue 705423002: Use expected main frame size from WebViewImpl when creating a new FrameView. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing build break from bad rebase Created 6 years, 1 month 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/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/PinchViewportTest.cpp
diff --git a/Source/web/tests/PinchViewportTest.cpp b/Source/web/tests/PinchViewportTest.cpp
index a588bcce149624563ec813aea6d414c7de659009..52742b2eef5736a98fd46c3b4588545cc5cdc81a 100644
--- a/Source/web/tests/PinchViewportTest.cpp
+++ b/Source/web/tests/PinchViewportTest.cpp
@@ -1209,5 +1209,23 @@ TEST_F(PinchViewportTest, TestTopControlHidingResizeDoesntClampMainFrame)
EXPECT_EQ(500, frameView.scrollPositionDouble().y());
}
+// Tests that when a new frame is created, it is created with the intended
+// size (i.e. the contentWidth).
+TEST_F(PinchViewportTest, TestMainFrameInitializationSizing)
+{
+ initializeWithAndroidSettings();
+
+ webViewImpl()->setPageScaleFactorLimits(0.5, 2.0);
+ webViewImpl()->resize(IntSize(100, 200));
+
+ registerMockedHttpURLLoad("content-width-1000.html");
+ navigateTo(m_baseURL + "content-width-1000.html");
+
+ WebLocalFrameImpl* localFrame = webViewImpl()->mainFrameImpl();
+ FrameView& frameView = *localFrame->frameView();
+ localFrame->createFrameView();
+
+ EXPECT_SIZE_EQ(IntSize(200, 400), frameView.frameRect().size());
+}
} // namespace
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698