Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 2404953002: cc/blimp: Set up hooks for scroll/scale sync. (Closed)
Patch Set: braces Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } 148 void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
149 149
150 private: 150 private:
151 gfx::ScrollOffset initial_scroll_; 151 gfx::ScrollOffset initial_scroll_;
152 gfx::ScrollOffset second_scroll_; 152 gfx::ScrollOffset second_scroll_;
153 gfx::Vector2dF scroll_amount_; 153 gfx::Vector2dF scroll_amount_;
154 int num_scrolls_; 154 int num_scrolls_;
155 int outer_viewport_container_layer_id_; 155 int outer_viewport_container_layer_id_;
156 }; 156 };
157 157
158 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollSimple); 158 REMOTE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollSimple);
159 159
160 class LayerTreeHostScrollTestScrollMultipleRedraw 160 class LayerTreeHostScrollTestScrollMultipleRedraw
161 : public LayerTreeHostScrollTest { 161 : public LayerTreeHostScrollTest {
162 public: 162 public:
163 LayerTreeHostScrollTestScrollMultipleRedraw() 163 LayerTreeHostScrollTestScrollMultipleRedraw()
164 : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {} 164 : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {}
165 165
166 void BeginTest() override { 166 void BeginTest() override {
167 scroll_layer_ = layer_tree()->outer_viewport_scroll_layer(); 167 scroll_layer_ = layer_tree()->outer_viewport_scroll_layer();
168 scroll_layer_->SetScrollOffset(initial_scroll_); 168 scroll_layer_->SetScrollOffset(initial_scroll_);
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 1973
1974 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = { 1974 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = {
1975 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5), 1975 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5),
1976 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)}; 1976 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)};
1977 }; 1977 };
1978 1978
1979 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll); 1979 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll);
1980 1980
1981 } // namespace 1981 } // namespace
1982 } // namespace cc 1982 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698