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

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

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: Merge branch 'master' into secondaryid 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698