Index: cc/layer_impl_unittest.cc |
diff --git a/cc/layer_impl_unittest.cc b/cc/layer_impl_unittest.cc |
index cc284c7d32a14b5ebddc99cee339448af4bd6f48..8ca6c75e0623b2a25969ab24ba96142659e1e298 100644 |
--- a/cc/layer_impl_unittest.cc |
+++ b/cc/layer_impl_unittest.cc |
@@ -7,6 +7,7 @@ |
#include "cc/single_thread_proxy.h" |
#include "cc/test/fake_impl_proxy.h" |
#include "cc/test/fake_layer_tree_host_impl.h" |
+#include "cc/test/fake_output_surface.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "third_party/skia/include/effects/SkBlurImageFilter.h" |
@@ -53,13 +54,13 @@ namespace { |
#define VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \ |
root->resetAllChangeTrackingForSubtree(); \ |
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting(); \ |
+ hostImpl.forcePrepareToDraw(); \ |
codeToTest; \ |
EXPECT_TRUE(hostImpl.needsUpdateDrawProperties()); |
#define VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \ |
root->resetAllChangeTrackingForSubtree(); \ |
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting(); \ |
+ hostImpl.forcePrepareToDraw(); \ |
codeToTest; \ |
EXPECT_FALSE(hostImpl.needsUpdateDrawProperties()); |
@@ -170,6 +171,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) |
{ |
FakeImplProxy proxy; |
FakeLayerTreeHostImpl hostImpl(&proxy); |
+ hostImpl.initializeRenderer(createFakeOutputSurface()); |
scoped_ptr<LayerImpl> root = LayerImpl::create(hostImpl.activeTree(), 1); |
gfx::PointF arbitraryPointF = gfx::PointF(0.125f, 0.25f); |
@@ -200,7 +202,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) |
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->scrollBy(arbitraryVector2d)); |
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->scrollBy(gfx::Vector2d())); |
root->setScrollDelta(gfx::Vector2d(0, 0)); |
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting(); |
+ hostImpl.forcePrepareToDraw(); |
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollDelta(arbitraryVector2d)); |
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollDelta(arbitraryVector2d)); |
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollOffset(arbitraryVector2d)); |