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

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

Issue 564043003: Add a setting to disable threaded scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
Index: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
diff --git a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
index a59135a02c4e839b932fc56f57b63195a8a90d47..d8819361cf020a05b22d6d69fc98bf3a5bfab1e5 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, mainScrollingWhenFastScrollingDisabled)
+{
+ navigateTo("about:blank");
+ webViewImpl()->settings()->setAcceleratedScrollingEnabled(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)

Powered by Google App Engine
This is Rietveld 408576698