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

Unified Diff: cc/layers/layer_unittest.cc

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up. Rebase. Created 5 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
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index bae8185053fe6a9123df9667313e584a4cce0bed..a216bfd205ec3c07fad75a250f420370a2b28361 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -1155,18 +1155,19 @@ static bool AddTestAnimation(Layer* layer) {
TEST(LayerLayerTreeHostTest, ShouldNotAddAnimationWithoutAnimationRegistrar) {
scoped_refptr<Layer> layer = Layer::Create();
+ LayerTreeSettings settings;
+ settings.accelerated_animation_enabled = false;
+
// Case 1: without a LayerTreeHost and without an AnimationRegistrar, the
// animation should not be accepted.
EXPECT_FALSE(AddTestAnimation(layer.get()));
scoped_ptr<AnimationRegistrar> registrar = AnimationRegistrar::Create();
- layer->layer_animation_controller()->SetAnimationRegistrar(registrar.get());
+ layer->RegisterForAnimations(registrar.get(), settings);
// Case 2: with an AnimationRegistrar, the animation should be accepted.
EXPECT_TRUE(AddTestAnimation(layer.get()));
- LayerTreeSettings settings;
- settings.accelerated_animation_enabled = false;
LayerTreeHostFactory factory;
scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create(settings);
layer_tree_host->SetRootLayer(layer);

Powered by Google App Engine
This is Rietveld 408576698