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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 2642123004: Fix surface reference assumptions in SurfaceManager. (Closed)
Patch Set: Rebase + fix test. 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 | « no previous file | cc/surfaces/surface_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index 6deff8b8d5061fec6d561ae16f06fb242d5d3685..03000b14014864e5f0d448e52fe4b29f59e2d910 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -502,11 +502,16 @@ TEST_F(SurfaceFactoryTest, Reset) {
SurfaceFactory::DrawCallback());
EXPECT_EQ(last_created_surface_id().local_frame_id(), id);
+ manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId);
+
SurfaceId surface_id(kArbitraryFrameSinkId, id);
- manager_.AddSurfaceReference(manager_.GetRootSurfaceId(), surface_id);
+ Surface* surface = manager_.GetSurfaceForId(surface_id);
+ surface->AddDestructionDependency(
+ SurfaceSequence(kAnotherArbitraryFrameSinkId, 4));
factory_->Reset();
EXPECT_TRUE(client_.returned_resources().empty());
- manager_.RemoveSurfaceReference(manager_.GetRootSurfaceId(), surface_id);
+
+ manager_.SatisfySequence(SurfaceSequence(kAnotherArbitraryFrameSinkId, 4));
EXPECT_TRUE(client_.returned_resources().empty());
local_frame_id_ = LocalFrameId();
}
« no previous file with comments | « no previous file | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698