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

Unified Diff: cc/tree_synchronizer_unittest.cc

Issue 11598005: Ref count layer animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 585db8f7865ffd8fdfc4a38b1dbc1f05b75a52c8..1c7e9278c52b0157ae291862182088996afaa45e 100644
--- a/cc/tree_synchronizer_unittest.cc
+++ b/cc/tree_synchronizer_unittest.cc
@@ -76,19 +76,20 @@ private:
class FakeLayerAnimationController : public LayerAnimationController {
public:
- static scoped_ptr<FakeLayerAnimationController> create(LayerAnimationControllerClient* client)
+ static scoped_refptr<LayerAnimationController> create()
{
- return make_scoped_ptr(new FakeLayerAnimationController(client));
+ return static_cast<LayerAnimationController*>(new FakeLayerAnimationController);
}
bool synchronizedAnimations() const { return m_synchronizedAnimations; }
private:
- explicit FakeLayerAnimationController(LayerAnimationControllerClient* client)
- : LayerAnimationController(client)
+ FakeLayerAnimationController()
+ : LayerAnimationController(1)
, m_synchronizedAnimations(false)
- {
- }
+ { }
+
+ virtual ~FakeLayerAnimationController() { }
virtual void pushAnimationUpdatesTo(LayerAnimationController* controllerImpl)
{
@@ -370,8 +371,7 @@ TEST_F(TreeSynchronizerTest, synchronizeAnimations)
scoped_refptr<Layer> layerTreeRoot = Layer::create();
- FakeLayerAnimationControllerClient dummy;
- layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create(&dummy).PassAs<LayerAnimationController>());
+ layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create());
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