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

Unified Diff: cc/input/single_scrollbar_animation_controller_thinning_unittest.cc

Issue 2824693002: Refactor LayerTreeImpl's scrollbar map to be keyed on element ids (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/single_scrollbar_animation_controller_thinning.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/single_scrollbar_animation_controller_thinning_unittest.cc
diff --git a/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc b/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc
index 87f9fe43056b8006ddb704355806ac19510a5633..29c9d75518a1ff9a7d5170c878860fa2f4aaecbf 100644
--- a/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc
+++ b/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc
@@ -35,8 +35,8 @@ class MockSingleScrollbarAnimationControllerClient
: host_impl_(host_impl) {}
virtual ~MockSingleScrollbarAnimationControllerClient() {}
- ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override {
- return host_impl_->ScrollbarsFor(scroll_layer_id);
+ ScrollbarSet ScrollbarsFor(ElementId scroll_element_id) const override {
+ return host_impl_->ScrollbarsFor(scroll_element_id);
}
MOCK_METHOD2(PostDelayedScrollbarAnimationTask,
@@ -65,6 +65,8 @@ class SingleScrollbarAnimationControllerThinningTest : public testing::Test {
LayerImpl::Create(host_impl_.active_tree(), 1);
std::unique_ptr<LayerImpl> clip =
LayerImpl::Create(host_impl_.active_tree(), 3);
+ scroll_layer->SetElementId(
+ LayerIdToElementIdForTesting(scroll_layer->id()));
clip_layer_ = clip.get();
scroll_layer->SetScrollClipLayer(clip_layer_->id());
LayerImpl* scroll_layer_ptr = scroll_layer.get();
@@ -93,7 +95,8 @@ class SingleScrollbarAnimationControllerThinningTest : public testing::Test {
host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting();
scrollbar_controller_ = SingleScrollbarAnimationControllerThinning::Create(
- scroll_layer_ptr->id(), HORIZONTAL, &client_, kThinningDuration);
+ scroll_layer_ptr->element_id(), HORIZONTAL, &client_,
+ kThinningDuration);
}
FakeImplTaskRunnerProvider task_runner_provider_;
« no previous file with comments | « cc/input/single_scrollbar_animation_controller_thinning.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698