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

Unified Diff: cc/CCLayerTreeHostTest.cpp

Issue 10907075: Roll cc snapshot up to 127605 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « cc/CCLayerTreeHostImplTest.cpp ('k') | cc/CCScheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCLayerTreeHostTest.cpp
diff --git a/cc/CCLayerTreeHostTest.cpp b/cc/CCLayerTreeHostTest.cpp
index 4debcb17b0af8551effba578bdcc2a6c16fd7844..489de8654b389ffca1b97df1dbb1e87facd97d6e 100644
--- a/cc/CCLayerTreeHostTest.cpp
+++ b/cc/CCLayerTreeHostTest.cpp
@@ -21,6 +21,8 @@
#include "FakeWebCompositorOutputSurface.h"
#include <gmock/gmock.h>
#include <public/Platform.h>
+#include <public/WebLayerScrollClient.h>
+#include <public/WebSize.h>
#include <wtf/MainThread.h>
#include <wtf/OwnArrayPtr.h>
@@ -2192,7 +2194,7 @@ private:
SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestLayerAddedWithAnimation)
-class CCLayerTreeHostTestScrollChildLayer : public CCLayerTreeHostTest, public LayerChromiumScrollDelegate {
+class CCLayerTreeHostTestScrollChildLayer : public CCLayerTreeHostTest, public WebLayerScrollClient {
public:
CCLayerTreeHostTestScrollChildLayer()
: m_scrollAmount(2, 1)
@@ -2215,7 +2217,7 @@ public:
m_rootScrollLayer->setMaxScrollPosition(IntSize(100, 100));
m_layerTreeHost->rootLayer()->addChild(m_rootScrollLayer);
m_childLayer = ContentLayerChromium::create(&m_mockDelegate);
- m_childLayer->setLayerScrollDelegate(this);
+ m_childLayer->setLayerScrollClient(this);
m_childLayer->setBounds(IntSize(50, 50));
m_childLayer->setIsDrawable(true);
m_childLayer->setScrollable(true);
@@ -2228,9 +2230,9 @@ public:
postSetNeedsCommitToMainThread();
}
- virtual void didScroll(const IntSize& scrollDelta) OVERRIDE
+ virtual void didScroll() OVERRIDE
{
- m_reportedScrollAmount = scrollDelta;
+ m_finalScrollPosition = m_childLayer->scrollPosition();
}
virtual void applyScrollAndScale(const IntSize& scrollDelta, float) OVERRIDE
@@ -2260,12 +2262,12 @@ public:
virtual void afterTest() OVERRIDE
{
- EXPECT_EQ(m_scrollAmount, m_reportedScrollAmount);
+ EXPECT_EQ(IntPoint(m_scrollAmount), m_finalScrollPosition);
}
private:
const IntSize m_scrollAmount;
- IntSize m_reportedScrollAmount;
+ IntPoint m_finalScrollPosition;
MockContentLayerChromiumClient m_mockDelegate;
RefPtr<LayerChromium> m_childLayer;
RefPtr<LayerChromium> m_rootScrollLayer;
« no previous file with comments | « cc/CCLayerTreeHostImplTest.cpp ('k') | cc/CCScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698