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

Side by Side Diff: cc/animation/animation_player_unittest.cc

Issue 1887593003: CC Animation: Make layer_animation_controller a private member of ElementAnimations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/animation/element_animations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/animation/animation_player.h" 5 #include "cc/animation/animation_player.h"
6 6
7 #include "cc/animation/animation_delegate.h" 7 #include "cc/animation/animation_delegate.h"
8 #include "cc/animation/animation_host.h" 8 #include "cc/animation/animation_host.h"
9 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
10 #include "cc/animation/animation_timeline.h" 10 #include "cc/animation/animation_timeline.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 host_->AddAnimationTimeline(timeline_); 261 host_->AddAnimationTimeline(timeline_);
262 timeline_->AttachPlayer(player_); 262 timeline_->AttachPlayer(player_);
263 263
264 EXPECT_FALSE(player_->element_animations()); 264 EXPECT_FALSE(player_->element_animations());
265 player_->RemoveAnimation(filter_id); 265 player_->RemoveAnimation(filter_id);
266 266
267 player_->AttachLayer(layer_id_); 267 player_->AttachLayer(layer_id_);
268 268
269 EXPECT_TRUE(player_->element_animations()); 269 EXPECT_TRUE(player_->element_animations());
270 EXPECT_FALSE(player_->element_animations() 270 EXPECT_FALSE(player_->element_animations()
271 ->layer_animation_controller()
272 ->GetAnimationById(filter_id)); 271 ->GetAnimationById(filter_id));
273 EXPECT_TRUE(player_->element_animations() 272 EXPECT_TRUE(player_->element_animations()
274 ->layer_animation_controller()
275 ->GetAnimationById(opacity_id)); 273 ->GetAnimationById(opacity_id));
276 274
277 host_->PushPropertiesTo(host_impl_); 275 host_->PushPropertiesTo(host_impl_);
278 276
279 EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE, 277 EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
280 TargetProperty::OPACITY)); 278 TargetProperty::OPACITY));
281 EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE, 279 EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
282 TargetProperty::OPACITY)); 280 TargetProperty::OPACITY));
283 281
284 EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE, 282 EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 358
361 host_->PushPropertiesTo(host_impl_); 359 host_->PushPropertiesTo(host_impl_);
362 360
363 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_layer_id)); 361 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_layer_id));
364 EXPECT_TRUE(player_impl_->element_animations()); 362 EXPECT_TRUE(player_impl_->element_animations());
365 EXPECT_EQ(player_impl_->layer_id(), new_layer_id); 363 EXPECT_EQ(player_impl_->layer_id(), new_layer_id);
366 } 364 }
367 365
368 } // namespace 366 } // namespace
369 } // namespace cc 367 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/animation/element_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698