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

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

Issue 305833002: Main frame should remain scrollable if the fullscreen element is the document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 6 years, 7 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/core/page/scrolling/ScrollingCoordinator.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/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 62992d996a65e768a79db90e8586d52ced11aed9..ae531d0a685fb82fc598e3d4be0d4106612b02dc 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -5352,6 +5352,30 @@ TEST_F(WebFrameTest, FullscreenLayerNonScrollable)
ASSERT_TRUE(webScrollLayer->scrollable());
}
+TEST_F(WebFrameTest, FullscreenMainFrameScrollable)
+{
+ FakeCompositingWebViewClient client;
+ registerMockedHttpURLLoad("fullscreen_div.html");
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ int viewportWidth = 640;
+ int viewportHeight = 480;
+ WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "fullscreen_div.html", true, 0, &client, &configueCompositingWebView);
+ webViewImpl->resize(WebSize(viewportWidth, viewportHeight));
+ webViewImpl->layout();
+
+ Document* document = toWebLocalFrameImpl(webViewImpl->mainFrame())->frame()->document();
+ WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGesture);
+ document->documentElement()->webkitRequestFullscreen();
+ webViewImpl->willEnterFullScreen();
+ webViewImpl->didEnterFullScreen();
+ webViewImpl->layout();
+
+ // Verify that the main frame is still scrollable.
+ ASSERT_TRUE(WebCore::FullscreenElementStack::isFullScreen(*document));
+ WebLayer* webScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer();
+ ASSERT_TRUE(webScrollLayer->scrollable());
+}
+
TEST_F(WebFrameTest, RenderBlockPercentHeightDescendants)
{
registerMockedHttpURLLoad("percent-height-descendants.html");
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698