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

Side by Side Diff: sky/engine/core/animation/AnimationPlayerTest.cpp

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/Init.cpp ('k') | sky/engine/core/animation/AnimationStackTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 RefPtrWillBePersistent<Element> element = document->createElement("foo", ASS ERT_NO_EXCEPTION); 776 RefPtrWillBePersistent<Element> element = document->createElement("foo", ASS ERT_NO_EXCEPTION);
777 777
778 Timing timing; 778 Timing timing;
779 RefPtrWillBeRawPtr<Animation> animation = Animation::create(element.get(), n ullptr, timing); 779 RefPtrWillBeRawPtr<Animation> animation = Animation::create(element.get(), n ullptr, timing);
780 RefPtrWillBeRawPtr<AnimationPlayer> player = timeline->createAnimationPlayer (animation.get()); 780 RefPtrWillBeRawPtr<AnimationPlayer> player = timeline->createAnimationPlayer (animation.get());
781 simulateFrame(0); 781 simulateFrame(0);
782 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 782 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
783 EXPECT_EQ(1U, element->activeAnimations()->players().find(player.get())->val ue); 783 EXPECT_EQ(1U, element->activeAnimations()->players().find(player.get())->val ue);
784 784
785 player.release(); 785 player.release();
786 Heap::collectAllGarbage();
787 EXPECT_TRUE(element->activeAnimations()->players().isEmpty()); 786 EXPECT_TRUE(element->activeAnimations()->players().isEmpty());
788 } 787 }
789 788
790 TEST_F(AnimationAnimationPlayerTest, HasLowerPriority) 789 TEST_F(AnimationAnimationPlayerTest, HasLowerPriority)
791 { 790 {
792 RefPtrWillBeRawPtr<AnimationPlayer> player1 = timeline->createAnimationPlaye r(0); 791 RefPtrWillBeRawPtr<AnimationPlayer> player1 = timeline->createAnimationPlaye r(0);
793 RefPtrWillBeRawPtr<AnimationPlayer> player2 = timeline->createAnimationPlaye r(0); 792 RefPtrWillBeRawPtr<AnimationPlayer> player2 = timeline->createAnimationPlaye r(0);
794 EXPECT_TRUE(AnimationPlayer::hasLowerPriority(player1.get(), player2.get())) ; 793 EXPECT_TRUE(AnimationPlayer::hasLowerPriority(player1.get(), player2.get())) ;
795 } 794 }
796 795
797 } 796 }
OLDNEW
« no previous file with comments | « sky/engine/core/Init.cpp ('k') | sky/engine/core/animation/AnimationStackTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698