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

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

Issue 311783002: Revert r274404 and r274409: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 4a2d0a56001098ab45cc129b8eb1f142da04692b..2ad69c2d9afe33470246f8b2f82abfec3c8f4a5b 100644
--- a/content/browser/web_contents/aura/window_slider_unittest.cc
+++ b/content/browser/web_contents/aura/window_slider_unittest.cc
@@ -341,6 +341,7 @@ 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);
@@ -427,7 +428,7 @@ TEST_F(WindowSliderTest, WindowSlideInterruptedThenContinues) {
ui::ScopedLayerAnimationSettings settings(animator);
base::TimeDelta duration = settings.GetTransitionDuration();
test_controller.StartThreadedAnimationsIfNeeded();
- animator->Step(gfx::FrameTime::Now() + duration);
+ element->Step(gfx::FrameTime::Now() + duration);
EXPECT_TRUE(slider_delegate.slide_completed());
EXPECT_FALSE(slider_delegate.slider_destroyed());
@@ -595,6 +596,7 @@ 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);
@@ -617,7 +619,7 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
test_controller.StartThreadedAnimationsIfNeeded();
base::TimeTicks start_time1 = gfx::FrameTime::Now();
- animator->Step(start_time1 + duration / 2);
+ element->Step(start_time1 + duration/2);
EXPECT_FALSE(slider_delegate.slide_completed());
slider_delegate.Reset();
// Generate another horizontal swipe while the animation from the previous
@@ -638,7 +640,7 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
test_controller.StartThreadedAnimationsIfNeeded();
base::TimeTicks start_time2 = gfx::FrameTime::Now();
slider_delegate.Reset();
- animator->Step(start_time2 + duration);
+ element->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/workspace_controller_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698