| Index: cc/trees/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
|
| index 1322f835e08d0e75f29d17c3aba64ed729847e98..5a83a0131db9f640080197cf65f18bcea06e3266 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -3041,6 +3041,21 @@ TEST_F(LayerTreeHostImplTest, ScrollScaledLayer) {
|
| wheel_scroll_delta);
|
| }
|
|
|
| +TEST_F(LayerTreeHostImplTest, ScrollViewportRounding) {
|
| + int width = 332;
|
| + int height = 20;
|
| + int scale = 3;
|
| + SetupScrollAndContentsLayers(gfx::Size(width, height));
|
| + host_impl_->SetViewportSize(gfx::Size(width * scale - 1, height * scale));
|
| + host_impl_->SetDeviceScaleFactor(scale);
|
| + host_impl_->active_tree()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f);
|
| +
|
| + LayerImpl* inner_viewport_scroll_layer =
|
| + host_impl_->active_tree()->InnerViewportScrollLayer();
|
| + EXPECT_EQ(gfx::Vector2d(0, 0),
|
| + inner_viewport_scroll_layer->MaxScrollOffset());
|
| +}
|
| +
|
| class TestScrollOffsetDelegate : public LayerScrollOffsetDelegate {
|
| public:
|
| TestScrollOffsetDelegate()
|
|
|