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

Unified Diff: cc/test/CCAnimationTestCommon.cpp

Issue 10961036: Gracefully handle zero duration curves in CCActiveAnimation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/CCAnimationTestCommon.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/CCAnimationTestCommon.cpp
diff --git a/cc/test/CCAnimationTestCommon.cpp b/cc/test/CCAnimationTestCommon.cpp
index 62cb17aed4a1fcd90113aa88036a6e00fea36349..6b7801ce28b3139a6f8c585774cd56b8ef3ec94b 100644
--- a/cc/test/CCAnimationTestCommon.cpp
+++ b/cc/test/CCAnimationTestCommon.cpp
@@ -58,6 +58,12 @@ void addAnimatedTransform(Target& target, double duration, int deltaX, int delta
namespace WebKitTests {
FakeFloatAnimationCurve::FakeFloatAnimationCurve()
+ : m_duration(1)
+{
+}
+
+FakeFloatAnimationCurve::FakeFloatAnimationCurve(double duration)
+ : m_duration(duration)
{
}
@@ -67,7 +73,7 @@ FakeFloatAnimationCurve::~FakeFloatAnimationCurve()
double FakeFloatAnimationCurve::duration() const
{
- return 1;
+ return m_duration;
}
float FakeFloatAnimationCurve::getValue(double now) const
« no previous file with comments | « cc/test/CCAnimationTestCommon.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698