| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } | 150 void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 gfx::ScrollOffset initial_scroll_; | 153 gfx::ScrollOffset initial_scroll_; |
| 154 gfx::ScrollOffset second_scroll_; | 154 gfx::ScrollOffset second_scroll_; |
| 155 gfx::Vector2dF scroll_amount_; | 155 gfx::Vector2dF scroll_amount_; |
| 156 int num_scrolls_; | 156 int num_scrolls_; |
| 157 int outer_viewport_container_layer_id_; | 157 int outer_viewport_container_layer_id_; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 REMOTE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollSimple); | 160 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollSimple); |
| 161 | 161 |
| 162 class LayerTreeHostScrollTestScrollMultipleRedraw | 162 class LayerTreeHostScrollTestScrollMultipleRedraw |
| 163 : public LayerTreeHostScrollTest { | 163 : public LayerTreeHostScrollTest { |
| 164 public: | 164 public: |
| 165 LayerTreeHostScrollTestScrollMultipleRedraw() | 165 LayerTreeHostScrollTestScrollMultipleRedraw() |
| 166 : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {} | 166 : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {} |
| 167 | 167 |
| 168 void BeginTest() override { | 168 void BeginTest() override { |
| 169 scroll_layer_ = layer_tree()->outer_viewport_scroll_layer(); | 169 scroll_layer_ = layer_tree()->outer_viewport_scroll_layer(); |
| 170 scroll_layer_->SetScrollOffset(initial_scroll_); | 170 scroll_layer_->SetScrollOffset(initial_scroll_); |
| (...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2238 |
| 2239 const float initial_page_scale_ = 0.5f; | 2239 const float initial_page_scale_ = 0.5f; |
| 2240 const float page_scale_update_ = 0.2f; | 2240 const float page_scale_update_ = 0.2f; |
| 2241 }; | 2241 }; |
| 2242 | 2242 |
| 2243 // The reflected deltas are supported in threaded mode only. | 2243 // The reflected deltas are supported in threaded mode only. |
| 2244 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestAppliesReflectedDeltas); | 2244 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestAppliesReflectedDeltas); |
| 2245 | 2245 |
| 2246 } // namespace | 2246 } // namespace |
| 2247 } // namespace cc | 2247 } // namespace cc |
| OLD | NEW |