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

Unified Diff: ui/gfx/animation/slide_animation_unittest.cc

Issue 2976873003: Added a nested class to gfx::Animation (Closed)
Patch Set: Removed animation export macro. Created 3 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/gfx/animation/animation_test_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/animation/slide_animation_unittest.cc
diff --git a/ui/gfx/animation/slide_animation_unittest.cc b/ui/gfx/animation/slide_animation_unittest.cc
index 5de1700906ab43cb49401ad7d8ef04a495cd74a6..2516ec090b1e372331157b6df8d70192b56d54cb 100644
--- a/ui/gfx/animation/slide_animation_unittest.cc
+++ b/ui/gfx/animation/slide_animation_unittest.cc
@@ -10,32 +10,14 @@
#include "base/test/scoped_task_environment.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/animation/animation_test_api.h"
#include "ui/gfx/animation/test_animation_delegate.h"
namespace gfx {
-// Class to provide access to SlideAnimation internals for testing.
-class SlideAnimation::TestApi {
- public:
- explicit TestApi(SlideAnimation* animation) : animation_(animation) {}
-
- void SetStartTime(base::TimeTicks ticks) {
- animation_->SetStartTime(ticks);
- }
-
- void Step(base::TimeTicks ticks) {
- animation_->Step(ticks);
- }
-
- private:
- SlideAnimation* animation_;
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
-};
-
////////////////////////////////////////////////////////////////////////////////
// SlideAnimationTest
-class SlideAnimationTest: public testing::Test {
+class SlideAnimationTest : public testing::Test {
protected:
SlideAnimationTest()
: scoped_task_environment_(
@@ -62,7 +44,7 @@ TEST_F(SlideAnimationTest, InitialState) {
TEST_F(SlideAnimationTest, Basics) {
SlideAnimation animation(nullptr);
- SlideAnimation::TestApi test_api(&animation);
+ AnimationTestApi test_api(&animation);
// Use linear tweening to make the math easier below.
animation.SetTweenType(Tween::LINEAR);
« no previous file with comments | « ui/gfx/animation/animation_test_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698