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

Unified Diff: ui/compositor/layer_animation_element.cc

Issue 420013002: Introduce NON_ZERO_DURATION for animation unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ui/aura/window_unittest.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.cc
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index c25e4a1dc9647ad3de449f74c24353fe89351582..663d156b2bf46b6ef68c75d9ba7689bf421c7225 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -25,6 +25,7 @@ namespace {
// FAST_DURATION.
const int kSlowDurationScaleFactor = 4;
const int kFastDurationScaleFactor = 4;
+const int kTestDurationScaleFactor = 100;
oshima 2014/07/26 00:53:26 Can we rename to something like XxxDuratinoMultipl
James Cook 2014/07/26 04:02:32 Done.
// Pause -----------------------------------------------------------------------
class Pause : public LayerAnimationElement {
@@ -764,6 +765,8 @@ base::TimeDelta LayerAnimationElement::GetEffectiveDuration(
return duration / kFastDurationScaleFactor;
case ScopedAnimationDurationScaleMode::SLOW_DURATION:
return duration * kSlowDurationScaleFactor;
+ case ScopedAnimationDurationScaleMode::TEST_DURATION:
+ return duration / kTestDurationScaleFactor;
case ScopedAnimationDurationScaleMode::ZERO_DURATION:
return base::TimeDelta();
default:
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698