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

Unified Diff: cc/blimp/layer_tree_host_remote_unittest.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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/blimp/layer_tree_host_remote.cc ('k') | cc/blink/web_layer_impl_fixed_bounds_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blimp/layer_tree_host_remote_unittest.cc
diff --git a/cc/blimp/layer_tree_host_remote_unittest.cc b/cc/blimp/layer_tree_host_remote_unittest.cc
index 0f50533ccdf298a1296583415884cd18c9a8bf06..e5575e7301ca6b122512def413f5ba653ad71a75 100644
--- a/cc/blimp/layer_tree_host_remote_unittest.cc
+++ b/cc/blimp/layer_tree_host_remote_unittest.cc
@@ -144,9 +144,8 @@ class MockLayer : public Layer {
class MockLayerTree : public LayerTree {
public:
- MockLayerTree(std::unique_ptr<AnimationHost> animation_host,
- LayerTreeHost* layer_tree_host)
- : LayerTree(std::move(animation_host), layer_tree_host) {}
+ MockLayerTree(MutatorHost* mutator_host, LayerTreeHost* layer_tree_host)
+ : LayerTree(mutator_host, layer_tree_host) {}
~MockLayerTree() override {}
// We don't want tree sync requests to trigger commits.
@@ -158,8 +157,7 @@ class LayerTreeHostRemoteForTesting : public LayerTreeHostRemote {
explicit LayerTreeHostRemoteForTesting(InitParams* params)
: LayerTreeHostRemote(
params,
- base::MakeUnique<MockLayerTree>(AnimationHost::CreateMainInstance(),
- this)) {}
+ base::MakeUnique<MockLayerTree>(params->mutator_host, this)) {}
~LayerTreeHostRemoteForTesting() override {}
};
@@ -172,6 +170,8 @@ class LayerTreeHostRemoteTest : public testing::Test {
~LayerTreeHostRemoteTest() override {}
void SetUp() override {
+ animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
+
LayerTreeHostRemote::InitParams params;
params.client = &mock_layer_tree_host_client_;
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner =
@@ -187,7 +187,7 @@ class LayerTreeHostRemoteTest : public testing::Test {
image_serialization_processor_.CreateEnginePictureCache();
LayerTreeSettings settings;
params.settings = &settings;
-
+ params.mutator_host = animation_host_.get();
layer_tree_host_ = base::MakeUnique<LayerTreeHostRemoteForTesting>(&params);
// Make sure the root layer always updates.
@@ -225,6 +225,7 @@ class LayerTreeHostRemoteTest : public testing::Test {
}
protected:
+ std::unique_ptr<AnimationHost> animation_host_;
std::unique_ptr<LayerTreeHostRemote> layer_tree_host_;
StrictMock<MockLayerTreeHostClient> mock_layer_tree_host_client_;
UpdateTrackingRemoteCompositorBridge* remote_compositor_bridge_ = nullptr;
« no previous file with comments | « cc/blimp/layer_tree_host_remote.cc ('k') | cc/blink/web_layer_impl_fixed_bounds_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698