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

Unified Diff: cc/trees/tree_synchronizer_unittest.cc

Issue 1782433002: CC Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasetests
Patch Set: Remove vtbl in LayerAnimationController. Fix formatting. Created 4 years, 9 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 | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/tree_synchronizer_unittest.cc
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc
index 417cda5077a4342c883d89fdf6c08e35196f2d4e..d35036d389ea9e2434209559002d41c420cd839e 100644
--- a/cc/trees/tree_synchronizer_unittest.cc
+++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -82,31 +82,6 @@ class MockLayer : public Layer {
std::vector<int>* layer_impl_destruction_list_;
};
-class FakeLayerAnimationController : public LayerAnimationController {
- public:
- static scoped_refptr<LayerAnimationController> Create() {
- return static_cast<LayerAnimationController*>(
- new FakeLayerAnimationController);
- }
-
- bool SynchronizedAnimations() const { return synchronized_animations_; }
-
- private:
- FakeLayerAnimationController()
- : LayerAnimationController(1),
- synchronized_animations_(false) {}
-
- ~FakeLayerAnimationController() override {}
-
- void PushAnimationUpdatesTo(
- LayerAnimationController* controller_impl) override {
- LayerAnimationController::PushAnimationUpdatesTo(controller_impl);
- synchronized_animations_ = true;
- }
-
- bool synchronized_animations_;
-};
-
void ExpectTreesAreIdentical(Layer* layer,
LayerImpl* layer_impl,
LayerTreeImpl* tree_impl) {
@@ -590,43 +565,6 @@ TEST_F(TreeSynchronizerTest, SyncMaskReplicaAndReplicaMaskLayers) {
host_->active_tree());
}
-TEST_F(TreeSynchronizerTest, SynchronizeAnimations) {
- LayerTreeSettingsForTreeSynchronizerTest settings;
- // This test is meaningless in new use_compositor_animation_timelines mode.
- // TODO(loyso): Delete FakeLayerAnimationController and related stuff.
- if (settings.use_compositor_animation_timelines)
- return;
-
- FakeImplTaskRunnerProvider task_runner_provider;
- FakeRenderingStatsInstrumentation stats_instrumentation;
- TestSharedBitmapManager shared_bitmap_manager;
- TestTaskGraphRunner task_graph_runner;
- scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
- settings, nullptr, &task_runner_provider, &stats_instrumentation,
- &shared_bitmap_manager, nullptr, &task_graph_runner, 0);
-
- scoped_refptr<Layer> layer_tree_root = Layer::Create(layer_settings_);
- host_->SetRootLayer(layer_tree_root);
-
- layer_tree_root->SetLayerAnimationControllerForTest(
- FakeLayerAnimationController::Create());
-
- EXPECT_FALSE(static_cast<FakeLayerAnimationController*>(
- layer_tree_root->layer_animation_controller())->SynchronizedAnimations());
-
- scoped_ptr<LayerImpl> layer_impl_tree_root =
- TreeSynchronizer::SynchronizeTrees(
- layer_tree_root.get(), nullptr, host_->active_tree());
- TreeSynchronizer::PushProperties(layer_tree_root.get(),
- layer_impl_tree_root.get());
- layer_impl_tree_root = TreeSynchronizer::SynchronizeTrees(
- layer_tree_root.get(), std::move(layer_impl_tree_root),
- host_->active_tree());
-
- EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(
- layer_tree_root->layer_animation_controller())->SynchronizedAnimations());
-}
-
TEST_F(TreeSynchronizerTest, SynchronizeScrollParent) {
LayerTreeSettings settings;
FakeImplTaskRunnerProvider task_runner_provider;
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698