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