Test both viewports' scrollability during fullscreen-video

Background:
To disable scrolling (and pinch-zoom) during <video>-
fullscreen ScrollingCoordinator makes both viewports
unscrollable in updateAfterCompositingChangeIfNeeded().

Problem:
Currently only the outer viewport's scrollability-
setting is tested during fullscreen-video.

Solution:
Extend test case to also verify the inner viewport.

BUG=448738

Review URL: https://codereview.chromium.org/1287253005

git-svn-id: svn://svn.chromium.org/blink/trunk@201007 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 01ddee5b
......@@ -6513,19 +6513,24 @@ TEST_F(WebFrameTest, FullscreenLayerNonScrollable)
webViewImpl->didEnterFullScreen();
webViewImpl->layout();
// Verify that the main frame is nonscrollable.
// Verify that the viewports are nonscrollable.
ASSERT_TRUE(Fullscreen::isFullScreen(*document));
WebLayer* webScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer();
ASSERT_FALSE(webScrollLayer->userScrollableHorizontal());
ASSERT_FALSE(webScrollLayer->userScrollableVertical());
// Verify that the main frame is scrollable upon exiting fullscreen.
FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()->frameView();
WebLayer* layoutViewportScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer();
WebLayer* visualViewportScrollLayer = frameView->page()->frameHost().visualViewport().scrollLayer()->platformLayer();
ASSERT_FALSE(layoutViewportScrollLayer->userScrollableHorizontal());
ASSERT_FALSE(layoutViewportScrollLayer->userScrollableVertical());
ASSERT_FALSE(visualViewportScrollLayer->userScrollableHorizontal());
ASSERT_FALSE(visualViewportScrollLayer->userScrollableVertical());
// Verify that the viewports are scrollable upon exiting fullscreen.
webViewImpl->didExitFullScreen();
webViewImpl->layout();
ASSERT_FALSE(Fullscreen::isFullScreen(*document));
webScrollLayer = webViewImpl->compositor()->scrollLayer()->platformLayer();
ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
ASSERT_TRUE(webScrollLayer->userScrollableVertical());
ASSERT_TRUE(layoutViewportScrollLayer->userScrollableHorizontal());
ASSERT_TRUE(layoutViewportScrollLayer->userScrollableVertical());
ASSERT_TRUE(visualViewportScrollLayer->userScrollableHorizontal());
ASSERT_TRUE(visualViewportScrollLayer->userScrollableVertical());
}
TEST_P(ParameterizedWebFrameTest, FullscreenMainFrame)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment