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

Unified Diff: ash/wm/window_animations_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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations_unittest.cc
diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc
index 0e1a4d8b24d3553cb1b3c08093f60230dc0f8ad9..7df1c4996d4f4f26d2e9589ee2266b9fbddb600b 100644
--- a/ash/wm/window_animations_unittest.cc
+++ b/ash/wm/window_animations_unittest.cc
@@ -16,6 +16,7 @@
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
+#include "ui/gfx/animation/animation_container_element.h"
using aura::Window;
using ui::Layer;
@@ -88,8 +89,11 @@ TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) {
EXPECT_TRUE(window->layer()->visible());
// Stays shown.
- window->layer()->GetAnimator()->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(5));
+ gfx::AnimationContainerElement* element =
+ static_cast<gfx::AnimationContainerElement*>(
+ window->layer()->GetAnimator());
+ element->Step(base::TimeTicks::Now() +
+ base::TimeDelta::FromSeconds(5));
EXPECT_EQ(0.0f, window->layer()->GetTargetBrightness());
EXPECT_EQ(0.0f, window->layer()->GetTargetGrayscale());
EXPECT_TRUE(window->layer()->visible());
@@ -137,10 +141,10 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) {
EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform());
// Run the animations to completion.
- old_layer->GetAnimator()->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(1));
- window->layer()->GetAnimator()->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(1));
+ static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step(
+ base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
+ static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())->
+ Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
// Cross fade to a smaller size, as in a restore animation.
old_layer = window->layer();
@@ -159,10 +163,10 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) {
EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity());
EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform());
- old_layer->GetAnimator()->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(1));
- window->layer()->GetAnimator()->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(1));
+ static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step(
+ base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
+ static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())->
+ Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
}
} // namespace wm
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698