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

Unified Diff: cc/resources/tile_manager_unittest.cc

Issue 291093008: cc: Prevent tiles that are required for activation from being placed in NEVER_BIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « cc/resources/tile_manager.cc ('k') | cc/test/test_tile_priorities.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager_unittest.cc
diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc
index 889a758f7963aad6a438ea11b128984e2145a429..5a1837f9684fb9e133a27c3fecfbea22d614d629 100644
--- a/cc/resources/tile_manager_unittest.cc
+++ b/cc/resources/tile_manager_unittest.cc
@@ -202,6 +202,19 @@ TEST_P(TileManagerTest, EnoughMemoryAllowPrepaintOnly) {
EXPECT_EQ(0, AssignedMemoryCount(never_bin));
}
+TEST_P(TileManagerTest, EnoughMemoryPendingLowResAllowAbsoluteMinimum) {
+ // A few low-res tiles required for activation, with enough memory for all
+ // tiles.
+
+ Initialize(5, ALLOW_ABSOLUTE_MINIMUM, SAME_PRIORITY_FOR_BOTH_TREES);
+ TileVector pending_low_res =
+ CreateTiles(5, TilePriority(), TilePriorityLowRes());
+
+ tile_manager()->AssignMemoryToTiles(global_state_);
+
+ EXPECT_EQ(5, AssignedMemoryCount(pending_low_res));
+}
+
TEST_P(TileManagerTest, EnoughMemoryAllowAbsoluteMinimum) {
// A few tiles of each type of priority, with enough memory for all tiles,
// with the exception of never and soon bins.
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/test/test_tile_priorities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698