Index: Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp |
=================================================================== |
--- Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp (revision 114754) |
+++ Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp (working copy) |
@@ -262,76 +262,4 @@ |
} |
} |
-TEST(CCTiledLayerImplTest, backgroundCoversViewport) |
-{ |
- DebugScopedSetImplThread scopedImplThread; |
- |
- const IntSize tileSize(10, 10); |
- const int numTilesX = 2; |
- const int numTilesY = 2; |
- const unsigned numTiles = numTilesX * numTilesY; |
- const IntSize layerSize(tileSize.width() * numTilesX, tileSize.height() * numTilesY); |
- OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels); |
- layer->setBackgroundColor(Color::gray); |
- layer->setBackgroundCoversViewport(true); |
- |
- // No gutter rects |
- { |
- IntRect clipRect = IntRect(IntPoint(), layerSize); |
- layer->setClipRect(clipRect); |
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize)); |
- |
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(); |
- |
- MockCCQuadCuller quadCuller; |
- bool usedCheckerboard = false; |
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard); |
- EXPECT_EQ(quadCuller.quadList().size(), numTiles); |
- |
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i) |
- EXPECT_EQ(quadCuller.quadList()[i]->material(), CCDrawQuad::TiledContent); |
- } |
- |
- // Empty visible content area (fullscreen gutter rect) |
- { |
- IntRect clipRect = IntRect(100, 100, 100, 100); |
- layer->setClipRect(clipRect); |
- layer->setVisibleLayerRect(IntRect()); |
- |
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(); |
- MockCCQuadCuller quadCuller; |
- bool usedCheckerboard = false; |
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard); |
- |
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i) |
- EXPECT_EQ(quadCuller.quadList()[i]->material(), CCDrawQuad::SolidColor); |
- |
- verifyQuadsExactlyCoverRect(quadCuller.quadList(), clipRect); |
- } |
- |
- // Content area in middle of clip rect (four surrounding gutter rects) |
- { |
- IntRect clipRect = IntRect(-50, -50, 100, 100); |
- layer->setClipRect(clipRect); |
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize)); |
- |
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(); |
- MockCCQuadCuller quadCuller; |
- bool usedCheckerboard = false; |
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard); |
- |
- unsigned numContentTiles = 0, numGutterTiles = 0; |
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i) { |
- if (quadCuller.quadList()[i]->material() == CCDrawQuad::TiledContent) |
- numContentTiles++; |
- else if (quadCuller.quadList()[i]->material() == CCDrawQuad::SolidColor) |
- numGutterTiles++; |
- } |
- EXPECT_EQ(numContentTiles, numTiles); |
- EXPECT_GE(numGutterTiles, 4u); |
- |
- verifyQuadsExactlyCoverRect(quadCuller.quadList(), clipRect); |
- } |
-} |
- |
} // namespace |