| Index: cc/CCLayerTreeHostImplTest.cpp
|
| diff --git a/cc/CCLayerTreeHostImplTest.cpp b/cc/CCLayerTreeHostImplTest.cpp
|
| index a8c346aeeba4fbad15d843ae2a47ad0587ee2bde..bad57821197b53a9b0e5fe941754460dccc16855 100644
|
| --- a/cc/CCLayerTreeHostImplTest.cpp
|
| +++ b/cc/CCLayerTreeHostImplTest.cpp
|
| @@ -380,6 +380,24 @@ TEST_F(CCLayerTreeHostImplTest, nonFastScrollableRegionWithOffset)
|
| EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(10, 10), CCInputHandlerClient::Wheel), CCInputHandlerClient::ScrollOnMainThread);
|
| }
|
|
|
| +TEST_F(CCLayerTreeHostImplTest, maxScrollPositionChangedByDeviceScaleFactor)
|
| +{
|
| + setupScrollAndContentsLayers(IntSize(100, 100));
|
| +
|
| + float deviceScaleFactor = 2;
|
| + IntSize layoutViewport(25, 25);
|
| + IntSize deviceViewport(layoutViewport);
|
| + deviceViewport.scale(deviceScaleFactor);
|
| + m_hostImpl->setViewportSize(layoutViewport, deviceViewport);
|
| + m_hostImpl->setDeviceScaleFactor(deviceScaleFactor);
|
| + EXPECT_EQ(m_hostImpl->rootLayer()->maxScrollPosition(), IntSize(25, 25));
|
| +
|
| + deviceScaleFactor = 1;
|
| + m_hostImpl->setViewportSize(layoutViewport, layoutViewport);
|
| + m_hostImpl->setDeviceScaleFactor(deviceScaleFactor);
|
| + EXPECT_EQ(m_hostImpl->rootLayer()->maxScrollPosition(), IntSize(75, 75));
|
| +}
|
| +
|
| TEST_F(CCLayerTreeHostImplTest, pinchGesture)
|
| {
|
| setupScrollAndContentsLayers(IntSize(100, 100));
|
|
|