Chromium Code Reviews| Index: cc/resources/picture_layer_tiling_unittest.cc |
| diff --git a/cc/resources/picture_layer_tiling_unittest.cc b/cc/resources/picture_layer_tiling_unittest.cc |
| index 990cdd4708455d1a4e57cd2179b7fd45ad5c0b6b..8f13fe1cbe32ec812cfb3e6bd8d457fb2491c389 100644 |
| --- a/cc/resources/picture_layer_tiling_unittest.cc |
| +++ b/cc/resources/picture_layer_tiling_unittest.cc |
| @@ -869,7 +869,13 @@ TEST(PictureLayerTilingTest, ExpandRectSmaller) { |
| EXPECT_EQ(out.bottom() - in.bottom(), in.y() - out.y()); |
| EXPECT_EQ(out.right() - in.right(), in.x() - out.x()); |
| EXPECT_EQ(out.width() - in.width(), out.height() - in.height()); |
| - EXPECT_NEAR(100 * 100, out.width() * out.height(), 50); |
| + |
| + // |in| represents the visible rect, and |out| represents the eventually rect. |
| + // if the eventually rect becomes smaller than the visible rect, we will start |
|
danakj
2014/09/09 15:52:03
If
|
| + // losing tiles. |
| + EXPECT_TRUE(out.width() >= in.width()); |
|
danakj
2014/09/09 15:52:03
out.Contains(in)? You want it to actually be inclu
|
| + EXPECT_TRUE(out.height() >= in.height()); |
| + |
| EXPECT_TRUE(bounds.Contains(out)); |
| } |
| @@ -1456,34 +1462,6 @@ static void CountExistingTiles(int *count, |
| ++(*count); |
| } |
| -TEST_F(PictureLayerTilingIteratorTest, |
| - TilesExistLargeViewportAndLayerWithLargeVisibleArea) { |
| - gfx::Size layer_bounds(10000, 10000); |
| - Initialize(gfx::Size(100, 100), 1.f, layer_bounds); |
| - VerifyTilesExactlyCoverRect(1.f, gfx::Rect(layer_bounds)); |
| - VerifyTiles(1.f, gfx::Rect(layer_bounds), base::Bind(&TileExists, false)); |
| - |
| - client_.set_tree(ACTIVE_TREE); |
| - set_max_tiles_for_interest_area(1); |
| - tiling_->UpdateTilePriorities( |
| - ACTIVE_TREE, |
| - gfx::Rect(layer_bounds), // visible content rect |
| - 1.f, // current contents scale |
| - 1.0, // current frame time |
| - NULL, // occlusion tracker |
| - NULL, // render target |
| - gfx::Transform()); // draw transform |
| - |
| - int num_tiles = 0; |
| - VerifyTiles(1.f, |
| - gfx::Rect(layer_bounds), |
| - base::Bind(&CountExistingTiles, &num_tiles)); |
| - // If we're making a rect the size of one tile, it can only overlap up to 4 |
| - // tiles depending on its position. |
| - EXPECT_LE(num_tiles, 4); |
| - VerifyTiles(1.f, gfx::Rect(), base::Bind(&TileExists, false)); |
| -} |
| - |
| TEST_F(PictureLayerTilingIteratorTest, AddTilingsToMatchScale) { |
| gfx::Size layer_bounds(1099, 801); |
| gfx::Size tile_size(100, 100); |