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

Unified Diff: ui/gfx/compositor/layer_animation_element_unittest.cc

Issue 8400059: Revert 107715 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/gfx/compositor/layer_animation_element.cc ('k') | ui/gfx/compositor/layer_animation_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer_animation_element_unittest.cc
===================================================================
--- ui/gfx/compositor/layer_animation_element_unittest.cc (revision 107719)
+++ ui/gfx/compositor/layer_animation_element_unittest.cc (working copy)
@@ -11,9 +11,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
-#include "ui/gfx/compositor/dummy_layer_animation_delegate.h"
#include "ui/gfx/compositor/layer_animation_delegate.h"
#include "ui/gfx/compositor/test_utils.h"
+#include "ui/gfx/compositor/test_layer_animation_delegate.h"
namespace ui {
@@ -22,7 +22,7 @@
// Check that the transformation element progresses the delegate as expected and
// that the element can be reused after it completes.
TEST(LayerAnimationElementTest, TransformElement) {
- DummyLayerAnimationDelegate delegate;
+ TestLayerAnimationDelegate delegate;
Transform start_transform, target_transform, middle_transform;
start_transform.SetRotate(-90);
target_transform.SetRotate(90);
@@ -44,17 +44,13 @@
delegate.GetTransformForAnimation());
}
- LayerAnimationElement::TargetValue target_value;
- element->GetTargetValue(&target_value);
- CheckApproximatelyEqual(target_transform, target_value.transform);
-
EXPECT_EQ(delta, element->duration());
}
// Check that the bounds element progresses the delegate as expected and
// that the element can be reused after it completes.
TEST(LayerAnimationElementTest, BoundsElement) {
- DummyLayerAnimationDelegate delegate;
+ TestLayerAnimationDelegate delegate;
gfx::Rect start, target, middle;
start = target = middle = gfx::Rect(0, 0, 50, 50);
start.set_x(-90);
@@ -74,17 +70,13 @@
CheckApproximatelyEqual(target, delegate.GetBoundsForAnimation());
}
- LayerAnimationElement::TargetValue target_value;
- element->GetTargetValue(&target_value);
- CheckApproximatelyEqual(target, target_value.bounds);
-
EXPECT_EQ(delta, element->duration());
}
// Check that the opacity element progresses the delegate as expected and
// that the element can be reused after it completes.
TEST(LayerAnimationElementTest, OpacityElement) {
- DummyLayerAnimationDelegate delegate;
+ TestLayerAnimationDelegate delegate;
float start = 0.0;
float middle = 0.5;
float target = 1.0;
@@ -102,10 +94,6 @@
EXPECT_FLOAT_EQ(target, delegate.GetOpacityForAnimation());
}
- LayerAnimationElement::TargetValue target_value;
- element->GetTargetValue(&target_value);
- EXPECT_FLOAT_EQ(target, target_value.opacity);
-
EXPECT_EQ(delta, element->duration());
}
@@ -121,8 +109,8 @@
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreatePauseElement(properties, delta));
- DummyLayerAnimationDelegate delegate;
- DummyLayerAnimationDelegate copy = delegate;
+ TestLayerAnimationDelegate delegate;
+ TestLayerAnimationDelegate copy = delegate;
element->Progress(1.0, &delegate);
« no previous file with comments | « ui/gfx/compositor/layer_animation_element.cc ('k') | ui/gfx/compositor/layer_animation_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698