Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / cc / resources / picture_pile_impl_unittest.cc
index c60bce3..40d1615 100644 (file)
@@ -634,11 +634,17 @@ TEST(PicturePileImplTest, PixelRefIteratorDiscardableRefsBaseNonDiscardable) {
   }
 }
 
-TEST(PicturePileImpl, RasterContentsOpaque) {
+class FullContentsTest : public ::testing::TestWithParam<bool> {};
+
+TEST_P(FullContentsTest, RasterFullContents) {
   gfx::Size tile_size(1000, 1000);
   gfx::Size layer_bounds(3, 5);
   float contents_scale = 1.5f;
   float raster_divisions = 2.f;
+  // Param in this case is whether the content is fully opaque
+  // or just filled completely. For this test they should behave the same.
+  bool contents_opaque = GetParam();
+  bool fills_content = !GetParam();
 
   scoped_refptr<FakePicturePileImpl> pile =
       FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
@@ -650,7 +656,8 @@ TEST(PicturePileImpl, RasterContentsOpaque) {
 
   pile->SetMinContentsScale(contents_scale);
   pile->set_background_color(SK_ColorBLACK);
-  pile->set_contents_opaque(true);
+  pile->set_contents_opaque(contents_opaque);
+  pile->set_contents_fill_bounds_completely(fills_content);
   pile->set_clear_canvas_with_debug_color(false);
   pile->RerecordPile();
 
@@ -703,6 +710,10 @@ TEST(PicturePileImpl, RasterContentsOpaque) {
   }
 }
 
+INSTANTIATE_TEST_CASE_P(PicturePileImpl,
+                        FullContentsTest,
+                        ::testing::Values(false, true));
+
 TEST(PicturePileImpl, RasterContentsTransparent) {
   gfx::Size tile_size(1000, 1000);
   gfx::Size layer_bounds(5, 3);