| OLD | NEW |
| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 EXPECT_EQ(player_, GetPlayerForElementId(element_id_)); | 388 EXPECT_EQ(player_, GetPlayerForElementId(element_id_)); |
| 389 EXPECT_TRUE(player_->element_animations()); | 389 EXPECT_TRUE(player_->element_animations()); |
| 390 EXPECT_EQ(player_->element_id(), element_id_); | 390 EXPECT_EQ(player_->element_id(), element_id_); |
| 391 | 391 |
| 392 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(element_id_)); | 392 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(element_id_)); |
| 393 EXPECT_TRUE(player_impl_->element_animations()); | 393 EXPECT_TRUE(player_impl_->element_animations()); |
| 394 EXPECT_EQ(player_impl_->element_id(), element_id_); | 394 EXPECT_EQ(player_impl_->element_id(), element_id_); |
| 395 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(false)); | 395 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(false)); |
| 396 | 396 |
| 397 const ElementId new_element_id(NextTestLayerId(), 0); | 397 const ElementId new_element_id(NextTestLayerId()); |
| 398 player_->DetachElement(); | 398 player_->DetachElement(); |
| 399 player_->AttachElement(new_element_id); | 399 player_->AttachElement(new_element_id); |
| 400 | 400 |
| 401 EXPECT_EQ(player_, GetPlayerForElementId(new_element_id)); | 401 EXPECT_EQ(player_, GetPlayerForElementId(new_element_id)); |
| 402 EXPECT_TRUE(player_->element_animations()); | 402 EXPECT_TRUE(player_->element_animations()); |
| 403 EXPECT_EQ(player_->element_id(), new_element_id); | 403 EXPECT_EQ(player_->element_id(), new_element_id); |
| 404 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(true)); | 404 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(true)); |
| 405 | 405 |
| 406 host_->PushPropertiesTo(host_impl_); | 406 host_->PushPropertiesTo(host_impl_); |
| 407 | 407 |
| 408 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); | 408 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); |
| 409 EXPECT_TRUE(player_impl_->element_animations()); | 409 EXPECT_TRUE(player_impl_->element_animations()); |
| 410 EXPECT_EQ(player_impl_->element_id(), new_element_id); | 410 EXPECT_EQ(player_impl_->element_id(), new_element_id); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace | 413 } // namespace |
| 414 } // namespace cc | 414 } // namespace cc |
| OLD | NEW |