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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: Fix tests and re-enable previous swap behavior Created 3 years, 11 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
« content/test/layouttest_support.cc ('K') | « content/test/layouttest_support.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 8f674a6916c2f439962b3c071ae41cfcf6065cf5..e518ba51d8ad52018e643736b70f4211a47c91da 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -1156,9 +1156,13 @@ TEST_F(LayerWithNullDelegateTest, EmptyDamagedRect) {
WaitForCommit();
EXPECT_TRUE(root->damaged_region_for_testing().IsEmpty());
- compositor()->SetRootLayer(nullptr);
- root.reset();
- WaitForCommit();
+ // The texture mailbox has a reference from an in-flight texture layer.
+ // We clear the texture mailbox from the root layer and draw a new frame
+ // to ensure that the texture mailbox is released. We then draw a second
+ // frame to ensure that the mailbox's release callback has time to run.
+ root->SetShowSolidColorContent();
+ Draw();
+ Draw();
}
void ExpectRgba(int x, int y, SkColor expected_color, SkColor actual_color) {
« content/test/layouttest_support.cc ('K') | « content/test/layouttest_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698