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

Unified Diff: cc/surfaces/surface_unittest.cc

Issue 1996783002: Make cc::SurfaceId unguessable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comment Created 4 years, 7 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_id_allocator.cc ('k') | components/mus/public/interfaces/surface_id.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_unittest.cc
diff --git a/cc/surfaces/surface_unittest.cc b/cc/surfaces/surface_unittest.cc
index 03ffc3a920b83e25434a847e8223a4d4538a0d6a..d4ac06e8f464cc4a57e3a99c34c906de31eaf20e 100644
--- a/cc/surfaces/surface_unittest.cc
+++ b/cc/surfaces/surface_unittest.cc
@@ -35,7 +35,7 @@ TEST(SurfaceTest, SurfaceLifetime) {
FakeSurfaceFactoryClient surface_factory_client;
SurfaceFactory factory(&manager, &surface_factory_client);
- SurfaceId surface_id(6);
+ SurfaceId surface_id(0, 6, 0);
{
factory.Create(surface_id);
EXPECT_TRUE(manager.GetSurfaceForId(surface_id));
@@ -54,7 +54,8 @@ TEST(SurfaceTest, SurfaceIds) {
EXPECT_EQ(id1.id_namespace(), id_namespace);
SurfaceId id2 = allocator.GenerateId();
EXPECT_EQ(id2.id_namespace(), id_namespace);
- EXPECT_NE(id1.id, id2.id);
+ EXPECT_NE(id1.local_id(), id2.local_id());
+ EXPECT_NE(id1.nonce(), id2.nonce());
}
}
« no previous file with comments | « cc/surfaces/surface_id_allocator.cc ('k') | components/mus/public/interfaces/surface_id.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698