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

Unified Diff: cc/surfaces/surface_unittest.cc

Issue 331533002: Use a struct for cc::Surface ids for more type safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 7b185125ab9deda6325284b5a43cfa505c1ab065..c2c857f9284eafbe75dd5e5a1578ef4281da4285 100644
--- a/cc/surfaces/surface_unittest.cc
+++ b/cc/surfaces/surface_unittest.cc
@@ -13,15 +13,15 @@ namespace {
TEST(SurfaceTest, SurfaceLifetime) {
SurfaceManager manager;
- int surface_id = 0;
+ SurfaceId surface_id;
{
Surface surface(&manager, NULL, gfx::Size(5, 5));
surface_id = surface.surface_id();
- EXPECT_GT(surface_id, 0);
- EXPECT_EQ(&surface, manager.GetSurfaceForID(surface_id));
+ EXPECT_GT(surface_id.id, 0);
+ EXPECT_EQ(&surface, manager.GetSurfaceForId(surface_id));
}
- EXPECT_EQ(NULL, manager.GetSurfaceForID(surface_id));
+ EXPECT_EQ(NULL, manager.GetSurfaceForId(surface_id));
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698