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"); |