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

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: s/accelerated/threaded/ 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
« no previous file with comments | « Source/web/WebSettingsImpl.cpp ('k') | public/web/WebSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/web/WebSettingsImpl.cpp ('k') | public/web/WebSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698