OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 vertical_scrollbar.get()); | 727 vertical_scrollbar.get()); |
728 | 728 |
729 // Trying to scroll with a vertical scrollbar will succeed. | 729 // Trying to scroll with a vertical scrollbar will succeed. |
730 EXPECT_TRUE(host_impl_->ScrollVerticallyByPage( | 730 EXPECT_TRUE(host_impl_->ScrollVerticallyByPage( |
731 gfx::Point(), SCROLL_FORWARD)); | 731 gfx::Point(), SCROLL_FORWARD)); |
732 EXPECT_FLOAT_EQ(875.f, host_impl_->RootScrollLayer()->ScrollDelta().y()); | 732 EXPECT_FLOAT_EQ(875.f, host_impl_->RootScrollLayer()->ScrollDelta().y()); |
733 EXPECT_TRUE(host_impl_->ScrollVerticallyByPage( | 733 EXPECT_TRUE(host_impl_->ScrollVerticallyByPage( |
734 gfx::Point(), SCROLL_BACKWARD)); | 734 gfx::Point(), SCROLL_BACKWARD)); |
735 } | 735 } |
736 | 736 |
737 TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) { | 737 // The user-scrollability breaks for zoomed-in pages. So disable this. |
| 738 // http://crbug.com/322223 |
| 739 TEST_F(LayerTreeHostImplTest, DISABLED_ScrollWithUserUnscrollableLayers) { |
738 LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(200, 200)); | 740 LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(200, 200)); |
739 host_impl_->SetViewportSize(gfx::Size(100, 100)); | 741 host_impl_->SetViewportSize(gfx::Size(100, 100)); |
740 | 742 |
741 gfx::Size overflow_size(400, 400); | 743 gfx::Size overflow_size(400, 400); |
742 ASSERT_EQ(1u, scroll_layer->children().size()); | 744 ASSERT_EQ(1u, scroll_layer->children().size()); |
743 LayerImpl* overflow = scroll_layer->children()[0]; | 745 LayerImpl* overflow = scroll_layer->children()[0]; |
744 overflow->SetBounds(overflow_size); | 746 overflow->SetBounds(overflow_size); |
745 overflow->SetContentBounds(overflow_size); | 747 overflow->SetContentBounds(overflow_size); |
746 overflow->SetScrollable(true); | 748 overflow->SetScrollable(true); |
747 overflow->SetMaxScrollOffset(gfx::Vector2d(overflow_size.width(), | 749 overflow->SetMaxScrollOffset(gfx::Vector2d(overflow_size.width(), |
(...skipping 4622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5370 EXPECT_TRUE(host_impl_->SwapBuffers(frame)); | 5372 EXPECT_TRUE(host_impl_->SwapBuffers(frame)); |
5371 | 5373 |
5372 const ui::LatencyInfo& metadata_latency_after = | 5374 const ui::LatencyInfo& metadata_latency_after = |
5373 fake_output_surface->last_sent_frame().metadata.latency_info; | 5375 fake_output_surface->last_sent_frame().metadata.latency_info; |
5374 EXPECT_TRUE(metadata_latency_after.FindLatency( | 5376 EXPECT_TRUE(metadata_latency_after.FindLatency( |
5375 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, NULL)); | 5377 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, NULL)); |
5376 } | 5378 } |
5377 | 5379 |
5378 } // namespace | 5380 } // namespace |
5379 } // namespace cc | 5381 } // namespace cc |
OLD | NEW |