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

Unified Diff: content/browser/web_contents/aura/window_slider_unittest.cc

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 | « ash/wm/window_animations_unittest.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/aura/window_slider_unittest.cc
diff --git a/content/browser/web_contents/aura/window_slider_unittest.cc b/content/browser/web_contents/aura/window_slider_unittest.cc
index 2ad69c2d9afe33470246f8b2f82abfec3c8f4a5b..4a2d0a56001098ab45cc129b8eb1f142da04692b 100644
--- a/content/browser/web_contents/aura/window_slider_unittest.cc
+++ b/content/browser/web_contents/aura/window_slider_unittest.cc
@@ -341,7 +341,6 @@ TEST_F(WindowSliderTest, WindowSlideInterruptedThenContinues) {
ui::ScopedAnimationDurationScaleMode normal_duration_(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
ui::LayerAnimator* animator = window->layer()->GetAnimator();
- gfx::AnimationContainerElement* element = animator;
animator->set_disable_timer_for_test(true);
ui::LayerAnimatorTestController test_controller(animator);
@@ -428,7 +427,7 @@ TEST_F(WindowSliderTest, WindowSlideInterruptedThenContinues) {
ui::ScopedLayerAnimationSettings settings(animator);
base::TimeDelta duration = settings.GetTransitionDuration();
test_controller.StartThreadedAnimationsIfNeeded();
- element->Step(gfx::FrameTime::Now() + duration);
+ animator->Step(gfx::FrameTime::Now() + duration);
EXPECT_TRUE(slider_delegate.slide_completed());
EXPECT_FALSE(slider_delegate.slider_destroyed());
@@ -596,7 +595,6 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
ui::ScopedAnimationDurationScaleMode normal_duration_(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
ui::LayerAnimator* animator = window->layer()->GetAnimator();
- gfx::AnimationContainerElement* element = animator;
animator->set_disable_timer_for_test(true);
ui::LayerAnimatorTestController test_controller(animator);
@@ -619,7 +617,7 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
test_controller.StartThreadedAnimationsIfNeeded();
base::TimeTicks start_time1 = gfx::FrameTime::Now();
- element->Step(start_time1 + duration/2);
+ animator->Step(start_time1 + duration / 2);
EXPECT_FALSE(slider_delegate.slide_completed());
slider_delegate.Reset();
// Generate another horizontal swipe while the animation from the previous
@@ -640,7 +638,7 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
test_controller.StartThreadedAnimationsIfNeeded();
base::TimeTicks start_time2 = gfx::FrameTime::Now();
slider_delegate.Reset();
- element->Step(start_time2 + duration);
+ animator->Step(start_time2 + duration);
// The animation for the second slide should now be completed.
EXPECT_TRUE(slider_delegate.slide_completed());
slider_delegate.Reset();
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698