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

Unified Diff: Source/core/frame/RootFrameViewportTest.cpp

Issue 1161713004: Rename ScrollableArea::scroll to userScroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comment Created 5 years, 7 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/core/frame/RootFrameViewport.cpp ('k') | Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/RootFrameViewportTest.cpp
diff --git a/Source/core/frame/RootFrameViewportTest.cpp b/Source/core/frame/RootFrameViewportTest.cpp
index ac99d6c1e8aae7c1dc7edc33359f1e30db2b7557..d2ac084f0659a45d3d71b6b8672f34540a7a54ba 100644
--- a/Source/core/frame/RootFrameViewportTest.cpp
+++ b/Source/core/frame/RootFrameViewportTest.cpp
@@ -191,7 +191,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
// Layout viewport shouldn't scroll since it's not horizontally scrollable,
// but visual viewport should.
- rootFrameViewport->scroll(ScrollRight, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollRight, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(50, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(50, 0), rootFrameViewport->scrollPositionDouble());
@@ -202,7 +202,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
layoutViewport.setUserInputScrollable(true, true);
visualViewport.setUserInputScrollable(false, true);
- rootFrameViewport->scroll(ScrollRight, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollRight, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(100, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(100, 0), rootFrameViewport->scrollPositionDouble());
@@ -213,7 +213,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
layoutViewport.setUserInputScrollable(false, true);
visualViewport.setUserInputScrollable(false, true);
- rootFrameViewport->scroll(ScrollRight, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollRight, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), rootFrameViewport->scrollPositionDouble());
@@ -222,7 +222,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
EXPECT_TRUE(rootFrameViewport->userInputScrollable(VerticalScrollbar));
// Vertical scrolling should be unaffected.
- rootFrameViewport->scroll(ScrollDown, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollDown, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 150), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 75), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 225), rootFrameViewport->scrollPositionDouble());
@@ -242,7 +242,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
// Layout viewport shouldn't scroll since it's not vertically scrollable,
// but visual viewport should.
- rootFrameViewport->scroll(ScrollDown, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollDown, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 75), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 75), rootFrameViewport->scrollPositionDouble());
@@ -253,7 +253,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
layoutViewport.setUserInputScrollable(true, true);
visualViewport.setUserInputScrollable(true, false);
- rootFrameViewport->scroll(ScrollDown, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollDown, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 150), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 150), rootFrameViewport->scrollPositionDouble());
@@ -264,7 +264,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
layoutViewport.setUserInputScrollable(true, false);
visualViewport.setUserInputScrollable(true, false);
- rootFrameViewport->scroll(ScrollDown, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollDown, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 0), rootFrameViewport->scrollPositionDouble());
@@ -273,7 +273,7 @@ TEST_F(RootFrameViewportTest, UserInputScrollable)
EXPECT_FALSE(rootFrameViewport->userInputScrollable(VerticalScrollbar));
// Horizontal scrolling should be unaffected.
- rootFrameViewport->scroll(ScrollRight, ScrollByPixel, 300);
+ rootFrameViewport->userScroll(ScrollRight, ScrollByPixel, 300);
EXPECT_POINT_EQ(DoublePoint(100, 0), layoutViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(50, 0), visualViewport.scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(150, 0), rootFrameViewport->scrollPositionDouble());
@@ -306,7 +306,7 @@ TEST_F(RootFrameViewportTest, TestScrollAnimatorUpdatedBeforeScroll)
visualViewport.setScrollPosition(DoublePoint(50, 75));
EXPECT_POINT_EQ(DoublePoint(50, 75), rootFrameViewport->scrollPositionDouble());
- rootFrameViewport->scroll(ScrollLeft, ScrollByPixel, 50);
+ rootFrameViewport->userScroll(ScrollLeft, ScrollByPixel, 50);
EXPECT_POINT_EQ(DoublePoint(0, 75), rootFrameViewport->scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 75), visualViewport.scrollPositionDouble());
@@ -328,7 +328,7 @@ TEST_F(RootFrameViewportTest, TestScrollAnimatorUpdatedBeforeScroll)
layoutViewport.setScrollPosition(DoublePoint(100, 150));
EXPECT_POINT_EQ(DoublePoint(100, 150), rootFrameViewport->scrollPositionDouble());
- rootFrameViewport->scroll(ScrollLeft, ScrollByPixel, 100);
+ rootFrameViewport->userScroll(ScrollLeft, ScrollByPixel, 100);
EXPECT_POINT_EQ(DoublePoint(0, 150), rootFrameViewport->scrollPositionDouble());
EXPECT_POINT_EQ(DoublePoint(0, 150), layoutViewport.scrollPositionDouble());
}
« no previous file with comments | « Source/core/frame/RootFrameViewport.cpp ('k') | Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698