| 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 5a83a0131db9f640080197cf65f18bcea06e3266..36734320e42294474b7451955f6344926698bb36 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -991,61 +991,6 @@ TEST_F(LayerTreeHostImplTest, ScrollWithSwapPromises) {
|
| EXPECT_EQ(latency_info.trace_id, scroll_info->swap_promises[0]->TraceId());
|
| }
|
|
|
| -TEST_F(LayerTreeHostImplTest, MasksToBoundsDoesntClobberInnerContainerSize) {
|
| - SetupScrollAndContentsLayers(gfx::Size(100, 100));
|
| - host_impl_->SetViewportSize(gfx::Size(50, 50));
|
| - DrawFrame();
|
| -
|
| - LayerImpl* scroll_layer = host_impl_->InnerViewportScrollLayer();
|
| - LayerImpl* container_layer = scroll_layer->scroll_clip_layer();
|
| - DCHECK(scroll_layer);
|
| -
|
| - float min_page_scale = 1.f;
|
| - float max_page_scale = 4.f;
|
| - host_impl_->active_tree()->SetPageScaleFactorAndLimits(1.f,
|
| - min_page_scale,
|
| - max_page_scale);
|
| -
|
| - // If the container's masks_to_bounds is false, the viewport size should
|
| - // overwrite the inner viewport container layer's size.
|
| - {
|
| - EXPECT_EQ(gfx::Size(50, 50),
|
| - container_layer->bounds());
|
| - container_layer->SetMasksToBounds(false);
|
| -
|
| - container_layer->SetBounds(gfx::Size(30, 25));
|
| - EXPECT_EQ(gfx::Size(30, 25),
|
| - container_layer->bounds());
|
| -
|
| - // This should cause a reset of the inner viewport container layer's bounds.
|
| - host_impl_->DidChangeTopControlsPosition();
|
| -
|
| - EXPECT_EQ(gfx::Size(50, 50),
|
| - container_layer->bounds());
|
| - }
|
| -
|
| - host_impl_->SetViewportSize(gfx::Size(50, 50));
|
| - container_layer->SetBounds(gfx::Size(50, 50));
|
| -
|
| - // If the container's masks_to_bounds is true, the viewport size should
|
| - // *NOT* overwrite the inner viewport container layer's size.
|
| - {
|
| - EXPECT_EQ(gfx::Size(50, 50),
|
| - container_layer->bounds());
|
| - container_layer->SetMasksToBounds(true);
|
| -
|
| - container_layer->SetBounds(gfx::Size(30, 25));
|
| - EXPECT_EQ(gfx::Size(30, 25),
|
| - container_layer->bounds());
|
| -
|
| - // This should cause a reset of the inner viewport container layer's bounds.
|
| - host_impl_->DidChangeTopControlsPosition();
|
| -
|
| - EXPECT_EQ(gfx::Size(30, 25),
|
| - container_layer->bounds());
|
| - }
|
| -}
|
| -
|
| TEST_F(LayerTreeHostImplTest, PinchGesture) {
|
| SetupScrollAndContentsLayers(gfx::Size(100, 100));
|
| host_impl_->SetViewportSize(gfx::Size(50, 50));
|
| @@ -2180,6 +2125,7 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest {
|
| // Set a viewport size that is large enough to contain both the top controls
|
| // and some content.
|
| host_impl_->SetViewportSize(viewport_size_);
|
| + host_impl_->SetTopControlsLayoutHeight(settings_.top_controls_height);
|
| LayerImpl* root_clip_ptr = host_impl_->active_tree()->root_layer();
|
| EXPECT_EQ(clip_size_, root_clip_ptr->bounds());
|
| }
|
| @@ -3046,7 +2992,8 @@ TEST_F(LayerTreeHostImplTest, ScrollViewportRounding) {
|
| int height = 20;
|
| int scale = 3;
|
| SetupScrollAndContentsLayers(gfx::Size(width, height));
|
| - host_impl_->SetViewportSize(gfx::Size(width * scale - 1, height * scale));
|
| + host_impl_->active_tree()->InnerViewportContainerLayer()->SetBounds(
|
| + gfx::Size(width * scale - 1, height * scale));
|
| host_impl_->SetDeviceScaleFactor(scale);
|
| host_impl_->active_tree()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f);
|
|
|
| @@ -6877,8 +6824,7 @@ TEST_F(LayerTreeHostImplTest, ExternalTransformReflectedInNextDraw) {
|
| }
|
|
|
| TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
|
| - SetupScrollAndContentsLayers(gfx::Size(100, 150));
|
| - host_impl_->SetViewportSize(gfx::Size(50, 50));
|
| + SetupScrollAndContentsLayers(gfx::Size(100, 200));
|
| DrawFrame();
|
|
|
| base::TimeTicks start_time =
|
|
|