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 ElementId new_element_id; |
| 398 new_element_id.id = NextTestLayerId(); |
398 player_->DetachElement(); | 399 player_->DetachElement(); |
399 player_->AttachElement(new_element_id); | 400 player_->AttachElement(new_element_id); |
400 | 401 |
401 EXPECT_EQ(player_, GetPlayerForElementId(new_element_id)); | 402 EXPECT_EQ(player_, GetPlayerForElementId(new_element_id)); |
402 EXPECT_TRUE(player_->element_animations()); | 403 EXPECT_TRUE(player_->element_animations()); |
403 EXPECT_EQ(player_->element_id(), new_element_id); | 404 EXPECT_EQ(player_->element_id(), new_element_id); |
404 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(true)); | 405 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(true)); |
405 | 406 |
406 host_->PushPropertiesTo(host_impl_); | 407 host_->PushPropertiesTo(host_impl_); |
407 | 408 |
408 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); | 409 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); |
409 EXPECT_TRUE(player_impl_->element_animations()); | 410 EXPECT_TRUE(player_impl_->element_animations()); |
410 EXPECT_EQ(player_impl_->element_id(), new_element_id); | 411 EXPECT_EQ(player_impl_->element_id(), new_element_id); |
411 } | 412 } |
412 | 413 |
413 } // namespace | 414 } // namespace |
414 } // namespace cc | 415 } // namespace cc |
OLD | NEW |