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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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: third_party/WebKit/Source/web/tests/TopControlsTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/TopControlsTest.cpp b/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
index f8b02f281840fe275bd6177db8f264fb3e1d2f62..e6a39ff13f3bdd3036ffe121ec0e665ca9cd9138 100644
--- a/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
+++ b/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
@@ -206,7 +206,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), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollBegin));
EXPECT_FLOAT_EQ(50.f, webView->topControls().contentOffset());
@@ -244,7 +244,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), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollBegin));
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
@@ -302,12 +302,12 @@ TEST_F(TopControlsTest, MAYBE(PageScaleHasNoImpact))
// Top controls should be scrolled partially and page should not scroll.
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollUpdate, 0, -20.f));
EXPECT_FLOAT_EQ(30.f, webView->topControls().contentOffset());
- EXPECT_POINT_EQ(IntPoint(0, 0), frame()->view()->scrollableArea()->scrollPositionDouble());
+ EXPECT_POINT_EQ(IntPoint(0, 0), frame()->view()->getScrollableArea()->scrollPositionDouble());
// Top controls should consume 30px and become hidden. Excess scroll should be consumed by the page at 2x scale.
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollUpdate, 0, -70.f));
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
- EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->scrollableArea()->scrollPositionDouble());
+ EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->getScrollableArea()->scrollPositionDouble());
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollEnd));
@@ -316,16 +316,16 @@ TEST_F(TopControlsTest, MAYBE(PageScaleHasNoImpact))
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollBegin));
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
- EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->scrollableArea()->scrollPositionDouble());
+ EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->getScrollableArea()->scrollPositionDouble());
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollUpdate, 0, 50.f));
EXPECT_FLOAT_EQ(50.f, webView->topControls().contentOffset());
- EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->scrollableArea()->scrollPositionDouble());
+ EXPECT_POINT_EQ(IntPoint(0, 20), frame()->view()->getScrollableArea()->scrollPositionDouble());
// At 0.5x scale scrolling 10px should take us to the top of the page.
webView->handleInputEvent(generateEvent(WebInputEvent::GestureScrollUpdate, 0, 10.f));
EXPECT_FLOAT_EQ(50.f, webView->topControls().contentOffset());
- EXPECT_POINT_EQ(IntPoint(0, 0), frame()->view()->scrollableArea()->scrollPositionDouble());
+ EXPECT_POINT_EQ(IntPoint(0, 0), frame()->view()->getScrollableArea()->scrollPositionDouble());
}
// Some scroll deltas result in a shownRatio that can't be realized in a
@@ -358,7 +358,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), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->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.
@@ -400,7 +400,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), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->setScrollPosition(IntPoint(0, 50), ProgrammaticScroll);
// Test scroll down
// Scroll down should scroll the iframe first but top controls and main frame should not scroll.
@@ -463,7 +463,7 @@ TEST_F(TopControlsTest, MAYBE(ZeroHeightMeansNoEffect))
WebViewImpl* webView = initialize();
webView->setTopControlsHeight(0, false);
webView->topControls().setShownRatio(0);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
EXPECT_FLOAT_EQ(0.f, webView->topControls().contentOffset());
@@ -517,7 +517,7 @@ TEST_F(TopControlsTest, MAYBE(StateConstraints))
{
WebViewImpl* webView = initialize();
webView->setTopControlsHeight(50.f, false);
- frame()->view()->scrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
+ frame()->view()->getScrollableArea()->setScrollPosition(IntPoint(0, 100), ProgrammaticScroll);
// Setting permitted state should not change content offset
webView->updateTopControlsState(WebTopControlsShown, WebTopControlsShown, false);

Powered by Google App Engine
This is Rietveld 408576698