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

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

Issue 1287253005: Test both viewports' scrollability during fullscreen-video (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | 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 6aa2c018c53cebd633bae8a5daaad312c266d826..093130d355c9ac358ce380e629589cd0e01b378d 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -6523,19 +6523,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();
bokan 2015/08/18 12:35:49 It's probably slightly more clear to get this via
Hugo Holgersson 2015/08/20 21:12:56 Hmm, I got a compile error when I tried that.
Hugo Holgersson 2015/08/21 17:28:47 Let's keep this lookup unchanged for now.
+ 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698