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

Unified Diff: cc/layers/nine_patch_layer_unittest.cc

Issue 61823008: Introduce separate client and init path for single-threaded cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/layers/layer_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/nine_patch_layer_unittest.cc
diff --git a/cc/layers/nine_patch_layer_unittest.cc b/cc/layers/nine_patch_layer_unittest.cc
index 7213a51e095e460c8e55a65773ce0adb53758a9b..41da351088ef8a19c082f6c62c2053af734a2cd1 100644
--- a/cc/layers/nine_patch_layer_unittest.cc
+++ b/cc/layers/nine_patch_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,20 @@ using ::testing::AnyNumber;
namespace cc {
namespace {
-class MockLayerTreeHost : public LayerTreeHost {
- public:
- explicit MockLayerTreeHost(LayerTreeHostClient* client)
- : LayerTreeHost(client, NULL, LayerTreeSettings()) {
- Initialize(NULL);
- }
-};
-
class NinePatchLayerTest : public testing::Test {
public:
NinePatchLayerTest() : 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();
}
virtual void TearDown() {
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
}
- scoped_ptr<MockLayerTreeHost> layer_tree_host_;
+ scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
FakeLayerTreeHostClient fake_client_;
};
@@ -66,8 +57,6 @@ TEST_F(NinePatchLayerTest, SetLayerProperties) {
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
EXPECT_EQ(test_layer->layer_tree_host(), layer_tree_host_.get());
- layer_tree_host_->InitializeOutputSurfaceIfNeeded();
-
ResourceUpdateQueue queue;
OcclusionTracker occlusion_tracker(gfx::Rect(), false);
test_layer->SavePaintProperties();
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698