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

Unified Diff: ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h

Issue 1944043002: Enabled tests to control material design ink drop animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Replaced unique_ptr with scoped_ptr. Created 4 years, 8 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: ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h
diff --git a/ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h b/ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..54b80c61b6fb02dc0b627eefaaf7fb55de720638
--- /dev/null
+++ b/ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_
+#define UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "ui/compositor/test/multi_layer_animator_test_controller.h"
+#include "ui/compositor/test/multi_layer_animator_test_controller_delegate.h"
+
+namespace ui {
+class LayerAnimator;
+} // namespace ui
+
+namespace views {
+class InkDropAnimationControllerImpl;
+class InkDropHover;
+
+namespace test {
+
+// Test API to provide internal access to an InkDropAnimationControllerImpl
+// instance. This can also be used to control the InkDropAnimation and
+// InkDropHover animations via the ui::test::MultiLayerAnimatorTestController
+// API.
+class InkDropAnimationControllerImplTestApi
+ : public ui::test::MultiLayerAnimatorTestController,
+ public ui::test::MultiLayerAnimatorTestControllerDelegate {
+ public:
+ explicit InkDropAnimationControllerImplTestApi(
+ InkDropAnimationControllerImpl* ink_drop_controller_);
+ ~InkDropAnimationControllerImplTestApi() override;
+
+ // Wrappers to InkDropAnimationControllerImpl internals:
+ const InkDropHover* hover() const;
+ bool IsHoverFadingInOrVisible() const;
+
+ protected:
+ // MultiLayerAnimatorTestControllerDelegate:
+ std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
+
+ private:
+ // The InkDropedAnimation to provide internal access to.
+ InkDropAnimationControllerImpl* ink_drop_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImplTestApi);
+};
+
+} // namespace test
+} // namespace views
+
+#endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_
« no previous file with comments | « ui/views/animation/ink_drop_hover.cc ('k') | ui/views/animation/test/ink_drop_animation_controller_impl_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698