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

Unified Diff: cc/layers/layer_unittest.cc

Issue 2174653002: cc: Break up with FakeLayerTreeHostClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fakeoutputsurface
Patch Set: lthclient-tests: . Created 4 years, 5 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/layers/layer_perftest.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 931232a6ef0096b4a38b3f5d8e7b74410f5ea1c4..02edf4c23183f8e8954a914c5d273cc34db5d3ab 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -26,6 +26,7 @@
#include "cc/test/geometry_test_utils.h"
#include "cc/test/layer_internals_for_test.h"
#include "cc/test/layer_test_common.h"
+#include "cc/test/stub_layer_tree_host_single_thread_client.h"
#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/test/test_task_graph_runner.h"
@@ -919,7 +920,7 @@ class LayerTest : public testing::Test {
AnimationHost::CreateForTesting(ThreadInstance::MAIN);
layer_tree_host_.reset(
- new StrictMock<MockLayerTreeHost>(&fake_client_, &params));
+ new StrictMock<MockLayerTreeHost>(&single_thread_client_, &params));
}
void TearDown() override {
@@ -988,6 +989,7 @@ class LayerTest : public testing::Test {
TestTaskGraphRunner task_graph_runner_;
FakeLayerTreeHostImpl host_impl_;
+ StubLayerTreeHostSingleThreadClient single_thread_client_;
FakeLayerTreeHostClient fake_client_;
std::unique_ptr<StrictMock<MockLayerTreeHost>> layer_tree_host_;
scoped_refptr<Layer> parent_;
@@ -1859,11 +1861,12 @@ class LayerTreeHostFactory {
params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
params.animation_host =
AnimationHost::CreateForTesting(ThreadInstance::MAIN);
- return LayerTreeHost::CreateSingleThreaded(&client_, &params);
+ return LayerTreeHost::CreateSingleThreaded(&single_thread_client_, &params);
}
private:
FakeLayerTreeHostClient client_;
+ StubLayerTreeHostSingleThreadClient single_thread_client_;
TestSharedBitmapManager shared_bitmap_manager_;
TestTaskGraphRunner task_graph_runner_;
TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
« no previous file with comments | « cc/layers/layer_perftest.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698