summaryrefslogtreecommitdiffstats
path: root/cc/layers/ui_resource_layer_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/layers/ui_resource_layer_unittest.cc')
-rw-r--r--cc/layers/ui_resource_layer_unittest.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/cc/layers/ui_resource_layer_unittest.cc b/cc/layers/ui_resource_layer_unittest.cc
index a2c75c1..48dbdf5 100644
--- a/cc/layers/ui_resource_layer_unittest.cc
+++ b/cc/layers/ui_resource_layer_unittest.cc
@@ -10,6 +10,7 @@
#include "cc/resources/resource_update_queue.h"
#include "cc/resources/scoped_ui_resource.h"
#include "cc/scheduler/texture_uploader.h"
+#include "cc/test/fake_layer_tree_host.h"
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_output_surface_client.h"
@@ -29,30 +30,21 @@ using ::testing::AnyNumber;
namespace cc {
namespace {
-class MockLayerTreeHost : public LayerTreeHost {
- public:
- explicit MockLayerTreeHost(LayerTreeHostClient* client)
- : LayerTreeHost(client, NULL, LayerTreeSettings()) {
- Initialize(NULL);
- }
-};
-
class UIResourceLayerTest : public testing::Test {
public:
UIResourceLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {}
- cc::Proxy* Proxy() const { return layer_tree_host_->proxy(); }
-
protected:
virtual void SetUp() {
- layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_));
+ layer_tree_host_ = FakeLayerTreeHost::Create();
+ layer_tree_host_->InitializeSingleThreaded(&fake_client_);
}
virtual void TearDown() {
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
}
- scoped_ptr<MockLayerTreeHost> layer_tree_host_;
+ scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
FakeLayerTreeHostClient fake_client_;
};