CC Animation: Port TreeSynchronizerTest to use animation timelines.
We preserve the old version of tests so we can fall back at any time.
BUG=394777
[email protected]
[email protected]
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1553353002
Cr-Commit-Position: refs/heads/master@{#367731}
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc
index a288da3..ede6dc0 100644
--- a/cc/trees/tree_synchronizer_unittest.cc
+++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -195,11 +195,24 @@
}
}
+class LayerTreeSettingsForTreeSynchronizerTest : public LayerTreeSettings {
+ public:
+ LayerTreeSettingsForTreeSynchronizerTest() {
+ use_compositor_animation_timelines = true;
+ }
+};
+
class TreeSynchronizerTest : public testing::Test {
public:
TreeSynchronizerTest()
: client_(FakeLayerTreeHostClient::DIRECT_3D),
- host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)) {}
+ host_(FakeLayerTreeHost::Create(
+ &client_,
+ &task_graph_runner_,
+ LayerTreeSettingsForTreeSynchronizerTest())) {
+ layer_settings_.use_compositor_animation_timelines =
+ host_->settings().use_compositor_animation_timelines;
+ }
protected:
FakeLayerTreeHostClient client_;
@@ -560,7 +573,12 @@
}
TEST_F(TreeSynchronizerTest, SynchronizeAnimations) {
- LayerTreeSettings settings;
+ 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;