| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |