summaryrefslogtreecommitdiffstats
path: root/cc/tiled_layer_impl_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/tiled_layer_impl_unittest.cc')
-rw-r--r--cc/tiled_layer_impl_unittest.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/cc/tiled_layer_impl_unittest.cc b/cc/tiled_layer_impl_unittest.cc
index a465771..13e0c05 100644
--- a/cc/tiled_layer_impl_unittest.cc
+++ b/cc/tiled_layer_impl_unittest.cc
@@ -199,29 +199,12 @@ TEST(TiledLayerImplTest, textureInfoForLayerNoBorders)
getQuads(quads, sharedStates, tileSize, layerSize, LayerTilingData::NoBorderTexels, gfx::Rect(gfx::Point(), layerSize));
for (size_t i = 0; i < quads.size(); ++i) {
- ASSERT_EQ(quads[i]->material(), DrawQuad::TILED_CONTENT) << quadString << i;
- TileDrawQuad* quad = static_cast<TileDrawQuad*>(quads[i]);
+ const TileDrawQuad* quad = TileDrawQuad::materialCast(quads[i]);
EXPECT_NE(quad->resourceId(), 0u) << quadString << i;
EXPECT_EQ(quad->textureOffset(), gfx::Vector2d()) << quadString << i;
EXPECT_EQ(quad->textureSize(), tileSize) << quadString << i;
- EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaqueRect()) << quadString << i;
- }
-}
-
-TEST(TiledLayerImplTest, tileOpaqueRectForLayerNoBorders)
-{
- gfx::Size tileSize(50, 50);
- gfx::Size layerSize(250, 250);
- QuadList quads;
- SharedQuadStateList sharedStates;
- getQuads(quads, sharedStates, tileSize, layerSize, LayerTilingData::NoBorderTexels, gfx::Rect(gfx::Point(), layerSize));
-
- for (size_t i = 0; i < quads.size(); ++i) {
- ASSERT_EQ(quads[i]->material(), DrawQuad::TILED_CONTENT) << quadString << i;
- TileDrawQuad* quad = static_cast<TileDrawQuad*>(quads[i]);
-
- EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaqueRect()) << quadString << i;
+ EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaque_rect()) << quadString << i;
}
}