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

Unified Diff: cc/layers/tiled_layer_impl_unittest.cc

Issue 137853021: cc: Add test for TiledLayerImpl mask with no resource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/tiled_layer_impl_unittest.cc
diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc
index deb276974cccdff6898182b770f799879e14edd9..377b04d6ddbdd3dcb2f7a2a10a087fe0fd8f936a 100644
--- a/cc/layers/tiled_layer_impl_unittest.cc
+++ b/cc/layers/tiled_layer_impl_unittest.cc
@@ -304,5 +304,16 @@ TEST_F(TiledLayerImplTest, GPUMemoryUsage) {
EXPECT_EQ(layer->GPUMemoryUsageInBytes(), 0u);
}
+TEST_F(TiledLayerImplTest, EmptyMask) {
+ gfx::Size tile_size(20, 20);
+ gfx::Size layer_size(0, 0);
+ scoped_ptr<TiledLayerImpl> layer =
+ CreateLayer(tile_size, layer_size, LayerTilingData::NO_BORDER_TEXELS);
+
+ EXPECT_EQ(0u, layer->ContentsResourceId());
+ EXPECT_EQ(0, layer->TilingForTesting()->num_tiles_x());
+ EXPECT_EQ(0, layer->TilingForTesting()->num_tiles_y());
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698