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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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/tests/ScrollAnimatorNoneTest.cpp ('k') | Source/web/tests/TouchActionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/TopControlsTest.cpp
diff --git a/Source/web/tests/TopControlsTest.cpp b/Source/web/tests/TopControlsTest.cpp
index e815aaeb175e53f9bb19d727551e34fea57c75ca..7a240ad407b1961e84d6b03bb41ae64db40a21db 100644
--- a/Source/web/tests/TopControlsTest.cpp
+++ b/Source/web/tests/TopControlsTest.cpp
@@ -199,7 +199,7 @@ TEST_F(TopControlsTest, MAYBE(ScrollDownThenUp))
// initialize top controls to be shown and position page at 100px.
webView->setTopControlsHeight(50.f, true);
webView->topControls().setShownRatio(1);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollBegin));
EXPECT_FLOAT_EQ(50.f, webView->topControls().contentOffset());
@@ -237,7 +237,7 @@ TEST_F(TopControlsTest, MAYBE(ScrollUpThenDown))
// initialize top controls to be hidden and position page at 100px.
webView->setTopControlsHeight(50.f, false);
webView->topControls().setShownRatio(0);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollBegin));
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
@@ -351,7 +351,7 @@ TEST_F(TopControlsTest, MAYBE(ScrollableSubregionScrollFirst))
WebViewImpl* webView = initialize("overflow-scrolling.html");
webView->setTopControlsHeight(50.f, true);
webView->topControls().setShownRatio(1);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 50));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 50), ProgrammaticScroll);
// Test scroll down
// Scroll down should scroll the overflow div first but top controls and main frame should not scroll.
@@ -393,7 +393,7 @@ TEST_F(TopControlsTest, MAYBE(ScrollableIframeScrollFirst))
WebViewImpl* webView = initialize("iframe-scrolling.html");
webView->setTopControlsHeight(50.f, true);
webView->topControls().setShownRatio(1);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 50));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 50), ProgrammaticScroll);
// Test scroll down
// Scroll down should scroll the iframe first but top controls and main frame should not scroll.
@@ -456,7 +456,7 @@ TEST_F(TopControlsTest, MAYBE(ZeroHeightMeansNoEffect))
WebViewImpl* webView = initialize();
webView->setTopControlsHeight(0, false);
webView->topControls().setShownRatio(0);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
@@ -510,7 +510,7 @@ TEST_F(TopControlsTest, MAYBE(StateConstraints))
{
WebViewImpl* webView = initialize();
webView->setTopControlsHeight(50.f, false);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100));
+ frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
// Setting permitted state should not change content offset
webView->updateTopControlsState(WebTopControlsShown, WebTopControlsShown, false);
« no previous file with comments | « Source/web/tests/ScrollAnimatorNoneTest.cpp ('k') | Source/web/tests/TouchActionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698