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

Unified Diff: cc/scrollbar_animation_controller_linear_fade_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/render_surface_unittest.cc ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_animation_controller_linear_fade_unittest.cc
diff --git a/cc/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/scrollbar_animation_controller_linear_fade_unittest.cc
index e335a8060fb7abca157b16a064789e689839190a..dd941c1891a663b1792a6d42d871feed0cb1b19b 100644
--- a/cc/scrollbar_animation_controller_linear_fade_unittest.cc
+++ b/cc/scrollbar_animation_controller_linear_fade_unittest.cc
@@ -6,19 +6,27 @@
#include "cc/scrollbar_layer_impl.h"
#include "cc/single_thread_proxy.h"
+#include "cc/test/fake_impl_proxy.h"
+#include "cc/test/fake_layer_tree_host_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cc {
namespace {
class ScrollbarAnimationControllerLinearFadeTest : public testing::Test {
+public:
+ ScrollbarAnimationControllerLinearFadeTest()
+ : m_hostImpl(&m_proxy)
+ {
+ }
+
protected:
virtual void SetUp()
{
- m_scrollLayer = LayerImpl::create(1);
- m_scrollLayer->addChild(LayerImpl::create(2));
+ m_scrollLayer = LayerImpl::create(&m_hostImpl, 1);
+ m_scrollLayer->addChild(LayerImpl::create(&m_hostImpl, 2));
m_contentLayer = m_scrollLayer->children()[0];
- m_scrollbarLayer = ScrollbarLayerImpl::create(3);
+ m_scrollbarLayer = ScrollbarLayerImpl::create(&m_hostImpl, 3);
m_scrollLayer->setMaxScrollOffset(gfx::Vector2d(50, 50));
m_contentLayer->setBounds(gfx::Size(50, 50));
@@ -27,6 +35,8 @@ protected:
m_scrollbarController->setHorizontalScrollbarLayer(m_scrollbarLayer.get());
}
+ FakeImplProxy m_proxy;
+ FakeLayerTreeHostImpl m_hostImpl;
scoped_ptr<ScrollbarAnimationControllerLinearFade> m_scrollbarController;
scoped_ptr<LayerImpl> m_scrollLayer;
LayerImpl* m_contentLayer;
« no previous file with comments | « cc/render_surface_unittest.cc ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698