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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 1673783004: Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register id namespace on Android Created 4 years, 9 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/surface_factory_client.h ('k') | 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 540d9da22c3032ea36ac2b27b058bfe7e4ed90a1..a48d6699d2942917c656d948ded5c3f54f595a7b 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -36,8 +36,7 @@ class TestSurfaceFactoryClient : public SurfaceFactoryClient {
returned_resources_.end(), resources.begin(), resources.end());
}
- void SetBeginFrameSource(SurfaceId surface_id,
- BeginFrameSource* begin_frame_source) override {
+ void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {
begin_frame_source_ = begin_frame_source;
}
@@ -594,36 +593,5 @@ TEST_F(SurfaceFactoryTest, DuplicateCopyRequest) {
EXPECT_TRUE(called3);
}
-// Verifies BFS is forwarded to the client.
-TEST_F(SurfaceFactoryTest, SetBeginFrameSource) {
- FakeBeginFrameSource bfs1;
- FakeBeginFrameSource bfs2;
- EXPECT_EQ(nullptr, client_.begin_frame_source());
- factory_->SetBeginFrameSource(surface_id_, &bfs1);
- EXPECT_EQ(&bfs1, client_.begin_frame_source());
- factory_->SetBeginFrameSource(surface_id_, &bfs2);
- EXPECT_EQ(&bfs2, client_.begin_frame_source());
- factory_->SetBeginFrameSource(surface_id_, nullptr);
- EXPECT_EQ(nullptr, client_.begin_frame_source());
-}
-
-TEST_F(SurfaceFactoryTest, BeginFrameSourceRemovedOnFactoryDestruction) {
- FakeBeginFrameSource bfs;
- factory_->SetBeginFrameSource(surface_id_, &bfs);
- EXPECT_EQ(&bfs, client_.begin_frame_source());
-
- // Prevent the Surface from being destroyed when we destroy the factory.
- manager_.RegisterSurfaceIdNamespace(0);
- manager_.GetSurfaceForId(surface_id_)
- ->AddDestructionDependency(SurfaceSequence(0, 4));
-
- surface_id_ = SurfaceId();
- factory_->DestroyAll();
-
- EXPECT_EQ(&bfs, client_.begin_frame_source());
- factory_.reset();
- EXPECT_EQ(nullptr, client_.begin_frame_source());
-}
-
} // namespace
} // namespace cc
« no previous file with comments | « cc/surfaces/surface_factory_client.h ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698