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

Unified Diff: Source/core/paint/DrawingRecorderTest.cpp

Issue 702633002: Move ViewDisplayList to GraphicsLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: copy & pasted test expectation from the wrong window. sorry. :( Created 6 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 | « Source/core/paint/DrawingRecorder.cpp ('k') | Source/core/paint/ViewDisplayList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DrawingRecorderTest.cpp
diff --git a/Source/core/paint/DrawingRecorderTest.cpp b/Source/core/paint/DrawingRecorderTest.cpp
index 68dfcea8378756cd0c29c3cb38c2e2d72c39eeb2..47654f57570886c47b0ab62e2246c39a576b1ac7 100644
--- a/Source/core/paint/DrawingRecorderTest.cpp
+++ b/Source/core/paint/DrawingRecorderTest.cpp
@@ -5,9 +5,12 @@
#include "config.h"
#include "core/paint/DrawingRecorder.h"
+#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/RenderingTestHelper.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/GraphicsLayer.h"
+#include "platform/graphics/paint/DisplayItemList.h"
#include <gtest/gtest.h>
namespace blink {
@@ -19,6 +22,7 @@ public:
protected:
RenderView* renderView() { return m_renderView; }
+ DisplayItemList& rootDisplayItemList() { return renderView()->layer()->graphicsLayerBacking()->displayItemList(); }
private:
virtual void SetUp() override
@@ -26,6 +30,7 @@ private:
RuntimeEnabledFeatures::setSlimmingPaintEnabled(true);
RenderingTest::SetUp();
+ enableCompositing();
m_renderView = document().view()->renderView();
ASSERT_TRUE(m_renderView);
@@ -51,10 +56,10 @@ TEST_F(DrawingRecorderTest, DrawingRecorderTest_Nothing)
{
GraphicsContext* context = new GraphicsContext(nullptr);
FloatRect bound = renderView()->viewRect();
- EXPECT_EQ((size_t)0, renderView()->viewDisplayList().paintList().size());
+ EXPECT_EQ((size_t)0, rootDisplayItemList().paintList().size());
drawNothing(context, renderView(), PaintPhaseForeground, bound);
- EXPECT_EQ((size_t)0, renderView()->viewDisplayList().paintList().size());
+ EXPECT_EQ((size_t)0, rootDisplayItemList().paintList().size());
}
TEST_F(DrawingRecorderTest, DrawingRecorderTest_Rect)
@@ -62,7 +67,7 @@ TEST_F(DrawingRecorderTest, DrawingRecorderTest_Rect)
GraphicsContext* context = new GraphicsContext(nullptr);
FloatRect bound = renderView()->viewRect();
drawRect(context, renderView(), PaintPhaseForeground, bound);
- EXPECT_EQ((size_t)1, renderView()->viewDisplayList().paintList().size());
+ EXPECT_EQ((size_t)1, rootDisplayItemList().paintList().size());
}
}
« no previous file with comments | « Source/core/paint/DrawingRecorder.cpp ('k') | Source/core/paint/ViewDisplayList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698