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

Unified Diff: Source/core/animation/DocumentTimelineTest.cpp

Issue 15405006: Modify AnimationEffect::sample() to return a CompositableValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/AnimationEffect.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/DocumentTimelineTest.cpp
diff --git a/Source/core/animation/DocumentTimelineTest.cpp b/Source/core/animation/DocumentTimelineTest.cpp
index fa782f957c8ee50434735839bee0e0d954ce3353..b8e8aa7ba313115fa58d54160f7245c9416dbe3b 100644
--- a/Source/core/animation/DocumentTimelineTest.cpp
+++ b/Source/core/animation/DocumentTimelineTest.cpp
@@ -43,17 +43,30 @@ using namespace WebCore;
namespace {
+class EmptyAnimationEffect : public AnimationEffect {
+public:
+ static PassRefPtr<EmptyAnimationEffect> create()
+ {
+ return adoptRef(new EmptyAnimationEffect);
+ }
+ virtual PassOwnPtr<CompositableValueMap> sample(int iteration, double fraction) const
+ {
+ return adoptPtr(new CompositableValueMap);
+ }
+private:
+ EmptyAnimationEffect() { }
+};
+
TEST(DocumentTimeline, AddAnAnimation)
{
RefPtr<Document> d = Document::create(0, KURL());
RefPtr<Element> e = Element::create(nullQName() , d.get());
RefPtr<DocumentTimeline> timeline = DocumentTimeline::create(d.get());
Timing timing;
- RefPtr<Animation> anim = Animation::create(e.get(), AnimationEffect::create(), timing);
+ RefPtr<Animation> anim = Animation::create(e.get(), EmptyAnimationEffect::create(), timing);
timeline->play(anim);
timeline->serviceAnimations(0);
- StylePropertySet* styleSet = anim->cachedStyle();
- ASSERT_EQ(0u, styleSet->propertyCount());
+ ASSERT_TRUE(anim->compositableValues()->isEmpty());
}
}
« no previous file with comments | « Source/core/animation/AnimationEffect.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698