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

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

Issue 1884083002: Revert of Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 { 730 {
731 Persistent<Element> element = document->createElement("foo", ASSERT_NO_EXCEP TION); 731 Persistent<Element> element = document->createElement("foo", ASSERT_NO_EXCEP TION);
732 732
733 Timing timing; 733 Timing timing;
734 KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullp tr, timing); 734 KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullp tr, timing);
735 Animation* animation = timeline->play(keyframeEffect); 735 Animation* animation = timeline->play(keyframeEffect);
736 simulateFrame(0); 736 simulateFrame(0);
737 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 737 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
738 EXPECT_EQ(1U, element->elementAnimations()->animations().find(animation)->va lue); 738 EXPECT_EQ(1U, element->elementAnimations()->animations().find(animation)->va lue);
739 739
740 ThreadHeap::collectAllGarbage(); 740 Heap::collectAllGarbage();
741 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); 741 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty());
742 } 742 }
743 743
744 TEST_F(AnimationAnimationTest, HasLowerPriority) 744 TEST_F(AnimationAnimationTest, HasLowerPriority)
745 { 745 {
746 Animation* animation1 = timeline->play(0); 746 Animation* animation1 = timeline->play(0);
747 Animation* animation2 = timeline->play(0); 747 Animation* animation2 = timeline->play(0);
748 EXPECT_TRUE(Animation::hasLowerPriority(animation1, animation2)); 748 EXPECT_TRUE(Animation::hasLowerPriority(animation1, animation2));
749 } 749 }
750 750
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 EXPECT_EQ(Animation::Idle, animation->playStateInternal()); 817 EXPECT_EQ(Animation::Idle, animation->playStateInternal());
818 EXPECT_TRUE(std::isnan(animation->currentTime())); 818 EXPECT_TRUE(std::isnan(animation->currentTime()));
819 EXPECT_TRUE(std::isnan(animation->startTime())); 819 EXPECT_TRUE(std::isnan(animation->startTime()));
820 animation->pause(); 820 animation->pause();
821 EXPECT_EQ(Animation::Pending, animation->playStateInternal()); 821 EXPECT_EQ(Animation::Pending, animation->playStateInternal());
822 EXPECT_EQ(0, animation->currentTime()); 822 EXPECT_EQ(0, animation->currentTime());
823 EXPECT_TRUE(std::isnan(animation->startTime())); 823 EXPECT_TRUE(std::isnan(animation->startTime()));
824 } 824 }
825 825
826 } // namespace blink 826 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698