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

Unified Diff: cc/input/scrollbar_animation_controller_unittest.cc

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (Closed)
Patch Set: none Created 3 years, 7 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/scrollbar_animation_controller.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scrollbar_animation_controller_unittest.cc
diff --git a/cc/input/scrollbar_animation_controller_unittest.cc b/cc/input/scrollbar_animation_controller_unittest.cc
index 07ae92a47a79fb20b07d551c8e161f3de11b65d5..463264800272eb158f8a2c177a14f81d2a1a5296 100644
--- a/cc/input/scrollbar_animation_controller_unittest.cc
+++ b/cc/input/scrollbar_animation_controller_unittest.cc
@@ -94,10 +94,12 @@ class ScrollbarAnimationControllerAuraOverlayTest : public testing::Test {
SolidColorScrollbarLayerImpl::Create(
host_impl_.active_tree(), 3, HORIZONTAL, kThumbThickness,
kTrackStart, kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar);
+ h_scrollbar->test_properties()->opacity = 0.0f;
std::unique_ptr<SolidColorScrollbarLayerImpl> v_scrollbar =
SolidColorScrollbarLayerImpl::Create(
host_impl_.active_tree(), 4, VERTICAL, kThumbThickness, kTrackStart,
kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar);
+ v_scrollbar->test_properties()->opacity = 0.0f;
v_scrollbar_layer_ = v_scrollbar.get();
h_scrollbar_layer_ = h_scrollbar.get();
@@ -123,7 +125,7 @@ class ScrollbarAnimationControllerAuraOverlayTest : public testing::Test {
scrollbar_controller_ = ScrollbarAnimationController::
CreateScrollbarAnimationControllerAuraOverlay(
scroll_layer_ptr->element_id(), &client_, kFadeDelay, kFadeDuration,
- kThinningDuration);
+ kThinningDuration, 0.0f);
v_scrollbar_layer_->SetCurrentPos(0);
h_scrollbar_layer_->SetCurrentPos(0);
}
@@ -1240,6 +1242,7 @@ class ScrollbarAnimationControllerAndroidTest
SolidColorScrollbarLayerImpl::Create(
host_impl_.active_tree(), 2, orientation(), kThumbThickness,
kTrackStart, kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar);
+ scrollbar->test_properties()->opacity = 0.0f;
scrollbar_layer_ = scrollbar.get();
scrollbar_layer_->test_properties()->opacity_can_animate = true;
std::unique_ptr<LayerImpl> clip =
@@ -1262,7 +1265,8 @@ class ScrollbarAnimationControllerAndroidTest
scrollbar_controller_ =
ScrollbarAnimationController::CreateScrollbarAnimationControllerAndroid(
scroll_layer_ptr->element_id(), this,
- base::TimeDelta::FromSeconds(2), base::TimeDelta::FromSeconds(3));
+ base::TimeDelta::FromSeconds(2), base::TimeDelta::FromSeconds(3),
+ 0.0f);
}
virtual ScrollbarOrientation orientation() const { return HORIZONTAL; }
« no previous file with comments | « cc/input/scrollbar_animation_controller.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698