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

Unified Diff: cc/surfaces/direct_compositor_frame_sink_unittest.cc

Issue 2633563003: Revert of Remove ForceReclaimResources (Closed)
Patch Set: 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
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/direct_compositor_frame_sink_unittest.cc
diff --git a/cc/surfaces/direct_compositor_frame_sink_unittest.cc b/cc/surfaces/direct_compositor_frame_sink_unittest.cc
index 6f986b9ffb31d4eba6725e5bd559bc633206f290..2b9375360039f2ea3b81431d4eaddc7a87cbf6e0 100644
--- a/cc/surfaces/direct_compositor_frame_sink_unittest.cc
+++ b/cc/surfaces/direct_compositor_frame_sink_unittest.cc
@@ -138,5 +138,18 @@
EXPECT_EQ(2u, display_output_surface_->num_sent_frames());
}
+TEST_F(DirectCompositorFrameSinkTest,
+ LockingResourcesDoesNotIndirectlyCauseDamage) {
+ compositor_frame_sink_->ForceReclaimResources();
+ EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
+ task_runner_->RunPendingTasks();
+ EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
+
+ SwapBuffersWithDamage(gfx::Rect());
+ EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
+ task_runner_->RunUntilIdle();
+ EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698