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

Unified Diff: cc/texture_layer_unittest.cc

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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/texture_layer_impl.cc ('k') | cc/tiled_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer_unittest.cc
diff --git a/cc/texture_layer_unittest.cc b/cc/texture_layer_unittest.cc
index 258f1280c6c6582d5ce4ab11702b0d2612fd9958..887f1b401e6add231a477def91d0067c166cd513 100644
--- a/cc/texture_layer_unittest.cc
+++ b/cc/texture_layer_unittest.cc
@@ -6,8 +6,10 @@
#include "cc/layer_tree_host.h"
#include "cc/single_thread_proxy.h"
-#include "cc/texture_layer_impl.h"
+#include "cc/test/fake_impl_proxy.h"
#include "cc/test/fake_layer_tree_host_client.h"
+#include "cc/test/fake_layer_tree_host_impl.h"
+#include "cc/texture_layer_impl.h"
#include "cc/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,6 +41,7 @@ private:
class TextureLayerTest : public testing::Test {
public:
TextureLayerTest()
+ : m_hostImpl(&m_proxy)
{
}
@@ -59,7 +62,8 @@ protected:
}
scoped_ptr<MockLayerImplTreeHost> m_layerTreeHost;
-private:
+ FakeImplProxy m_proxy;
+ FakeLayerTreeHostImpl m_hostImpl;
};
TEST_F(TextureLayerTest, syncImplWhenChangingTextureId)
@@ -96,7 +100,7 @@ TEST_F(TextureLayerTest, syncImplWhenDrawing)
scoped_refptr<TextureLayer> testLayer = TextureLayer::create(0);
ASSERT_TRUE(testLayer);
scoped_ptr<TextureLayerImpl> implLayer;
- implLayer = TextureLayerImpl::create(1);
+ implLayer = TextureLayerImpl::create(&m_hostImpl, 1);
ASSERT_TRUE(implLayer);
EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AnyNumber());
« no previous file with comments | « cc/texture_layer_impl.cc ('k') | cc/tiled_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698