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

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: Fixed unit tests 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
Index: cc/surfaces/surface_unittest.cc
diff --git a/cc/surfaces/surface_unittest.cc b/cc/surfaces/surface_unittest.cc
index 03ffc3a920b83e25434a847e8223a4d4538a0d6a..786ee44a7c09fcd043e1accccb232403e2284419 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, 0, 6);
{
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.nonce(), id2.nonce());
+ EXPECT_NE(id1.local_id(), id2.local_id());
}
}

Powered by Google App Engine
This is Rietveld 408576698