OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/debug/micro_benchmark_controller.h" | 5 #include "cc/debug/micro_benchmark_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 base::WrapUnique(new FakeImplTaskRunnerProvider); | 28 base::WrapUnique(new FakeImplTaskRunnerProvider); |
29 layer_tree_host_impl_ = base::MakeUnique<FakeLayerTreeHostImpl>( | 29 layer_tree_host_impl_ = base::MakeUnique<FakeLayerTreeHostImpl>( |
30 impl_task_runner_provider_.get(), &shared_bitmap_manager_, | 30 impl_task_runner_provider_.get(), &shared_bitmap_manager_, |
31 &task_graph_runner_); | 31 &task_graph_runner_); |
32 | 32 |
33 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_, | 33 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_, |
34 &task_graph_runner_); | 34 &task_graph_runner_); |
35 layer_tree_host_->SetRootLayer(Layer::Create()); | 35 layer_tree_host_->SetRootLayer(Layer::Create()); |
36 layer_tree_host_->InitializeForTesting( | 36 layer_tree_host_->InitializeForTesting( |
37 TaskRunnerProvider::Create(nullptr, nullptr), | 37 TaskRunnerProvider::Create(nullptr, nullptr), |
38 std::unique_ptr<Proxy>(new FakeProxy), nullptr); | 38 std::unique_ptr<Proxy>(new FakeProxy)); |
39 } | 39 } |
40 | 40 |
41 void TearDown() override { | 41 void TearDown() override { |
42 layer_tree_host_impl_ = nullptr; | 42 layer_tree_host_impl_ = nullptr; |
43 layer_tree_host_ = nullptr; | 43 layer_tree_host_ = nullptr; |
44 impl_task_runner_provider_ = nullptr; | 44 impl_task_runner_provider_ = nullptr; |
45 } | 45 } |
46 | 46 |
47 FakeLayerTreeHostClient layer_tree_host_client_; | 47 FakeLayerTreeHostClient layer_tree_host_client_; |
48 TestTaskGraphRunner task_graph_runner_; | 48 TestTaskGraphRunner task_graph_runner_; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // Send invalid message to valid benchmark | 170 // Send invalid message to valid benchmark |
171 message = base::WrapUnique(new base::DictionaryValue); | 171 message = base::WrapUnique(new base::DictionaryValue); |
172 message->SetBoolean("can_handle", false); | 172 message->SetBoolean("can_handle", false); |
173 message_handled = | 173 message_handled = |
174 layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message)); | 174 layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message)); |
175 EXPECT_FALSE(message_handled); | 175 EXPECT_FALSE(message_handled); |
176 } | 176 } |
177 | 177 |
178 } // namespace | 178 } // namespace |
179 } // namespace cc | 179 } // namespace cc |
OLD | NEW |