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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('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 73ccf751d70cee6cae4dc04584f1d78b77604840..a61db53f16e504c00ecfb1d52cf8ffe871322017 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -67,7 +67,8 @@ gpu::SyncToken GenTestSyncToken(int id) {
class SurfaceFactoryTest : public testing::Test, public SurfaceDamageObserver {
public:
SurfaceFactoryTest()
- : factory_(new SurfaceFactory(&manager_, &client_)),
+ : factory_(
+ new SurfaceFactory(kArbitraryFrameSinkId, &manager_, &client_)),
surface_id_(kArbitraryFrameSinkId, 3, 0),
frame_sync_token_(GenTestSyncToken(4)),
consumer_sync_token_(GenTestSyncToken(5)) {
@@ -516,9 +517,10 @@ TEST_F(SurfaceFactoryTest, DestroySequence) {
// Tests that Surface ID namespace invalidation correctly allows
// Sequences to be ignored.
-TEST_F(SurfaceFactoryTest, InvalidClientId) {
- FrameSinkId frame_sink_id(9, 9);
- SurfaceId id(frame_sink_id, 5, 0);
+TEST_F(SurfaceFactoryTest, InvalidFrameSinkId) {
+ FrameSinkId frame_sink_id(1234, 5678);
+
+ SurfaceId id(factory_->frame_sink_id(), 5, 0);
factory_->Create(id);
manager_.RegisterFrameSinkId(frame_sink_id);
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698