Index: cc/resources/tile_manager_unittest.cc |
diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc |
index 9cd251bbf4958d1ae6c5e75283cf2d39e72211de..030f8ab77ed5c787bfd458b9566bb99244040272 100644 |
--- a/cc/resources/tile_manager_unittest.cc |
+++ b/cc/resources/tile_manager_unittest.cc |
@@ -898,6 +898,8 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) { |
tile_manager()->InitializeTilesWithResourcesForTesting( |
std::vector<Tile*>(all_tiles.begin(), all_tiles.end())); |
+ pending_layer_->MarkVisibleResourcesAsRequired(); |
vmpstr
2014/08/14 06:23:49
This line alone (without the other changes in the
|
+ |
Tile* last_tile = NULL; |
smoothness_tiles.clear(); |
tile_count = 0; |
@@ -916,8 +918,13 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) { |
tile->priority(ACTIVE_TREE).priority_bin); |
if (last_tile->priority(ACTIVE_TREE).priority_bin == |
tile->priority(ACTIVE_TREE).priority_bin) { |
- EXPECT_GE(last_tile->priority(ACTIVE_TREE).distance_to_visible, |
- tile->priority(ACTIVE_TREE).distance_to_visible); |
+ EXPECT_LE(last_tile->required_for_activation(), |
+ tile->required_for_activation()); |
+ if (last_tile->required_for_activation() == |
+ tile->required_for_activation()) { |
+ EXPECT_GE(last_tile->priority(ACTIVE_TREE).distance_to_visible, |
+ tile->priority(ACTIVE_TREE).distance_to_visible); |
+ } |
} |
last_tile = tile; |
@@ -945,8 +952,13 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueue) { |
tile->priority(PENDING_TREE).priority_bin); |
if (last_tile->priority(PENDING_TREE).priority_bin == |
tile->priority(PENDING_TREE).priority_bin) { |
- EXPECT_GE(last_tile->priority(PENDING_TREE).distance_to_visible, |
- tile->priority(PENDING_TREE).distance_to_visible); |
+ EXPECT_LE(last_tile->required_for_activation(), |
+ tile->required_for_activation()); |
+ if (last_tile->required_for_activation() == |
+ tile->required_for_activation()) { |
+ EXPECT_GE(last_tile->priority(PENDING_TREE).distance_to_visible, |
+ tile->priority(PENDING_TREE).distance_to_visible); |
+ } |
} |
last_tile = tile; |