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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationTest.cpp

Issue 2321223003: Revert of Move collectGarbage* methods to ThreadState (Closed)
Patch Set: Created 4 years, 3 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
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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 { 736 {
737 Persistent<Element> element = document->createElement("foo", ASSERT_NO_EXCEP TION); 737 Persistent<Element> element = document->createElement("foo", ASSERT_NO_EXCEP TION);
738 738
739 Timing timing; 739 Timing timing;
740 KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullp tr, timing); 740 KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullp tr, timing);
741 Animation* animation = timeline->play(keyframeEffect); 741 Animation* animation = timeline->play(keyframeEffect);
742 simulateFrame(0); 742 simulateFrame(0);
743 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 743 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
744 EXPECT_EQ(1U, element->elementAnimations()->animations().find(animation)->va lue); 744 EXPECT_EQ(1U, element->elementAnimations()->animations().find(animation)->va lue);
745 745
746 ThreadState::current()-> collectAllGarbage(); 746 ThreadHeap::collectAllGarbage();
747 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); 747 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty());
748 } 748 }
749 749
750 TEST_F(AnimationAnimationTest, HasLowerPriority) 750 TEST_F(AnimationAnimationTest, HasLowerPriority)
751 { 751 {
752 Animation* animation1 = timeline->play(0); 752 Animation* animation1 = timeline->play(0);
753 Animation* animation2 = timeline->play(0); 753 Animation* animation2 = timeline->play(0);
754 EXPECT_TRUE(Animation::hasLowerPriority(animation1, animation2)); 754 EXPECT_TRUE(Animation::hasLowerPriority(animation1, animation2));
755 } 755 }
756 756
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 EXPECT_EQ(Animation::Idle, animation->playStateInternal()); 824 EXPECT_EQ(Animation::Idle, animation->playStateInternal());
825 EXPECT_TRUE(std::isnan(animation->currentTime())); 825 EXPECT_TRUE(std::isnan(animation->currentTime()));
826 EXPECT_TRUE(std::isnan(animation->startTime())); 826 EXPECT_TRUE(std::isnan(animation->startTime()));
827 animation->pause(); 827 animation->pause();
828 EXPECT_EQ(Animation::Pending, animation->playStateInternal()); 828 EXPECT_EQ(Animation::Pending, animation->playStateInternal());
829 EXPECT_EQ(0, animation->currentTime()); 829 EXPECT_EQ(0, animation->currentTime());
830 EXPECT_TRUE(std::isnan(animation->startTime())); 830 EXPECT_TRUE(std::isnan(animation->startTime()));
831 } 831 }
832 832
833 } // namespace blink 833 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698