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

Unified Diff: cc/tree_synchronizer_unittest.cc

Issue 11491003: Revert 171714 - Use an auxiliary list of animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tree_synchronizer_unittest.cc
diff --git a/cc/tree_synchronizer_unittest.cc b/cc/tree_synchronizer_unittest.cc
index 6759f20c22f4851f743c5eb16338dc9afa8feb22..fb15c1084613bb7ac19c4b0717ef9b97d19f3191 100644
--- a/cc/tree_synchronizer_unittest.cc
+++ b/cc/tree_synchronizer_unittest.cc
@@ -75,20 +75,19 @@ private:
class FakeLayerAnimationController : public LayerAnimationController {
public:
- static scoped_refptr<LayerAnimationController> create()
+ static scoped_ptr<FakeLayerAnimationController> create(LayerAnimationControllerClient* client)
{
- return static_cast<LayerAnimationController*>(new FakeLayerAnimationController);
+ return make_scoped_ptr(new FakeLayerAnimationController(client));
}
bool synchronizedAnimations() const { return m_synchronizedAnimations; }
private:
- FakeLayerAnimationController()
- : LayerAnimationController()
+ explicit FakeLayerAnimationController(LayerAnimationControllerClient* client)
+ : LayerAnimationController(client)
, m_synchronizedAnimations(false)
- { }
-
- virtual ~FakeLayerAnimationController() { }
+ {
+ }
virtual void pushAnimationUpdatesTo(LayerAnimationController* controllerImpl)
{
@@ -393,7 +392,8 @@ TEST(TreeSynchronizerTest, synchronizeAnimations)
scoped_refptr<Layer> layerTreeRoot = Layer::create();
- layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummy;
+ layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create(&dummy).PassAs<LayerAnimationController>());
EXPECT_FALSE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerAnimationController())->synchronizedAnimations());
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698