Index: Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
diff --git a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
index 104f075d45d39c4af10c38451fcb240d08608eb6..9e86707434e257940d82b03f430f1e0ba620ac41 100644 |
--- a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
+++ b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
@@ -68,12 +68,12 @@ void drawRect(GraphicsContext& context, LayoutView& layoutView, PaintPhase phase |
context.drawRect(rect); |
} |
-bool isDrawing(const DisplayItems::ItemHandle& item) |
+bool isDrawing(const DisplayItem& item) |
{ |
return DisplayItem::isDrawingType(item.type()); |
} |
-bool isCached(const DisplayItems::ItemHandle& item) |
+bool isCached(const DisplayItem& item) |
{ |
return DisplayItem::isCachedType(item.type()); |
} |
@@ -87,9 +87,9 @@ TEST_F(LayoutObjectDrawingRecorderTest, Nothing) |
drawNothing(context, layoutView(), PaintPhaseForeground, bound); |
rootDisplayItemList().commitNewDisplayItems(); |
EXPECT_EQ((size_t)1, rootDisplayItemList().displayItems().size()); |
- const auto& item = rootDisplayItemList().displayItems()[0]; |
+ const auto& item = *rootDisplayItemList().displayItems().elementAt(0); |
ASSERT_TRUE(isDrawing(item)); |
- EXPECT_FALSE(item.picture()); |
+ EXPECT_FALSE(static_cast<const DrawingDisplayItem&>(item).picture()); |
} |
TEST_F(LayoutObjectDrawingRecorderTest, Rect) |
@@ -99,7 +99,7 @@ TEST_F(LayoutObjectDrawingRecorderTest, Rect) |
drawRect(context, layoutView(), PaintPhaseForeground, bound); |
rootDisplayItemList().commitNewDisplayItems(); |
EXPECT_EQ((size_t)1, rootDisplayItemList().displayItems().size()); |
- EXPECT_TRUE(isDrawing(rootDisplayItemList().displayItems()[0])); |
+ EXPECT_TRUE(isDrawing(*rootDisplayItemList().displayItems().elementAt(0))); |
} |
TEST_F(LayoutObjectDrawingRecorderTest, Cached) |
@@ -110,18 +110,18 @@ TEST_F(LayoutObjectDrawingRecorderTest, Cached) |
drawRect(context, layoutView(), PaintPhaseForeground, bound); |
rootDisplayItemList().commitNewDisplayItems(); |
EXPECT_EQ((size_t)2, rootDisplayItemList().displayItems().size()); |
- EXPECT_TRUE(isDrawing(rootDisplayItemList().displayItems()[0])); |
- EXPECT_TRUE(isDrawing(rootDisplayItemList().displayItems()[1])); |
+ EXPECT_TRUE(isDrawing(*rootDisplayItemList().displayItems().elementAt(0))); |
+ EXPECT_TRUE(isDrawing(*rootDisplayItemList().displayItems().elementAt(1))); |
drawNothing(context, layoutView(), PaintPhaseBlockBackground, bound); |
drawRect(context, layoutView(), PaintPhaseForeground, bound); |
EXPECT_EQ((size_t)2, newDisplayItemsBeforeUpdate().size()); |
- EXPECT_TRUE(isCached(newDisplayItemsBeforeUpdate()[0])); |
- EXPECT_TRUE(isCached(newDisplayItemsBeforeUpdate()[1])); |
+ EXPECT_TRUE(isCached(*newDisplayItemsBeforeUpdate().elementAt(0))); |
+ EXPECT_TRUE(isCached(*newDisplayItemsBeforeUpdate().elementAt(1))); |
rootDisplayItemList().commitNewDisplayItems(); |
EXPECT_EQ((size_t)2, rootDisplayItemList().displayItems().size()); |
- EXPECT_TRUE(isDrawing(rootDisplayItemList().displayItems()[0])); |
- EXPECT_TRUE(isDrawing(rootDisplayItemList().displayItems()[1])); |
+ EXPECT_TRUE(isDrawing(*rootDisplayItemList().displayItems().elementAt(0))); |
+ EXPECT_TRUE(isDrawing(*rootDisplayItemList().displayItems().elementAt(1))); |
} |
} // namespace |