Index: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp |
diff --git a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp |
index a59135a02c4e839b932fc56f57b63195a8a90d47..c6d46af9f77c5ab0a038a45046e86eae63239205 100644 |
--- a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp |
+++ b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp |
@@ -124,6 +124,24 @@ TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingByDefault) |
ASSERT_FALSE(rootScrollLayer->haveWheelEventHandlers()); |
} |
+TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingCanBeDisabledWithSetting) |
+{ |
+ navigateTo("about:blank"); |
+ webViewImpl()->settings()->setThreadedScrollingEnabled(false); |
+ forceFullCompositingUpdate(); |
+ |
+ // Make sure the scrolling coordinator is active. |
+ FrameView* frameView = frame()->view(); |
+ Page* page = frame()->page(); |
+ ASSERT_TRUE(page->scrollingCoordinator()); |
+ ASSERT_TRUE(page->scrollingCoordinator()->coordinatesScrollingForFrameView(frameView)); |
+ |
+ // Main scrolling should be enabled with the setting override. |
+ WebLayer* rootScrollLayer = getRootScrollLayer(); |
+ ASSERT_TRUE(rootScrollLayer->scrollable()); |
+ ASSERT_TRUE(rootScrollLayer->shouldScrollOnMainThread()); |
+} |
+ |
static WebLayer* webLayerFromElement(Element* element) |
{ |
if (!element) |