Index: ui/gfx/animation/animation_test_api.h |
diff --git a/ui/gfx/animation/animation_test_api.h b/ui/gfx/animation/animation_test_api.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0939342f4fe6fb52e7f274fae173b501bac5d7c6 |
--- /dev/null |
+++ b/ui/gfx/animation/animation_test_api.h |
@@ -0,0 +1,33 @@ |
+// Copyright (c) 2017 The Chromium Authors. All rights reserved. |
sky
2017/07/13 23:14:05
no (c) (see style guide).
newcomer
2017/07/17 14:54:32
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GFX_ANIMATION_ANIMATION_TEST_API_H_ |
+#define UI_GFX_ANIMATION_ANIMATION_TEST_API_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/gfx/animation/animation.h" |
+ |
+namespace gfx { |
+ |
+// Class to provide access to Animation internals for testing. |
+class ANIMATION_EXPORT AnimationTestApi { |
+ public: |
+ explicit AnimationTestApi(Animation* animation); |
+ ~AnimationTestApi(); |
+ |
+ // Sets the start of the animation. |
+ void SetStartTime(base::TimeTicks ticks); |
+ |
+ // Manually steps the animation forward |
+ void Step(base::TimeTicks ticks); |
+ |
+ private: |
+ Animation* animation_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AnimationTestApi); |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GFX_ANIMATION_ANIMATION_TEST_API_H_ |