Index: cc/trees/layer_tree_host_unittest_picture.cc |
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc |
index 7d3d5254f4f0d7a25331d78462ae8562a32bd499..6f222f71e719e47a6b44c3675b6e545cface7c8b 100644 |
--- a/cc/trees/layer_tree_host_unittest_picture.cc |
+++ b/cc/trees/layer_tree_host_unittest_picture.cc |
@@ -242,8 +242,8 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree |
EXPECT_TRUE(tiling->TileAt(0, 0)); |
EXPECT_FALSE(tiling->TileAt(0, num_tiles_y)); |
- // The recycled tiling matches it. |
- EXPECT_TRUE(recycled_tiling->TileAt(0, 0)); |
+ // The recycled tiling has no tiles. |
+ EXPECT_FALSE(recycled_tiling->TileAt(0, 0)); |
EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y)); |
// The live tiles rect matches on the recycled tree. |
@@ -266,10 +266,6 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree |
// either. |
EXPECT_FALSE(recycled_tiling->TileAt(0, 0)); |
- // The live tiles rect matches on the recycled tree. |
- EXPECT_EQ(tiling->live_tiles_rect(), |
- recycled_tiling->live_tiles_rect()); |
- |
// Make the top of the layer visible again. |
picture_impl->SetPosition(gfx::PointF()); |
impl->SetNeedsRedraw(); |
@@ -284,8 +280,8 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree |
EXPECT_TRUE(tiling->TileAt(0, 0)); |
EXPECT_FALSE(tiling->TileAt(0, num_tiles_y)); |
- // The recycled tiling should also have tiles at the top. |
- EXPECT_TRUE(recycled_tiling->TileAt(0, 0)); |
+ // The recycled tiling should have no tiles. |
+ EXPECT_FALSE(recycled_tiling->TileAt(0, 0)); |
EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y)); |
// The live tiles rect matches on the recycled tree. |
@@ -308,9 +304,15 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree |
PictureLayerTiling* tiling = picture_impl->HighResTiling(); |
int num_tiles_y = tiling->TilingDataForTesting().num_tiles_y(); |
- // The pending layer should always have tiles at the top of it each commit. |
- // The tile is part of the required for activation set so it should exist. |
- EXPECT_TRUE(tiling->TileAt(0, 0)); |
+ if (!impl->active_tree()->root_layer()) { |
+ // If active tree doesn't have the layer, then pending tree should have |
+ // all needed tiles. |
+ EXPECT_TRUE(tiling->TileAt(0, 0)); |
+ } else { |
+ // Since there was no invalidation, the pending tree shouldn't have any |
+ // tiles. |
+ EXPECT_FALSE(tiling->TileAt(0, 0)); |
+ } |
EXPECT_FALSE(tiling->TileAt(0, num_tiles_y)); |
if (did_post_commit_) |