| Index: cc/surfaces/surface_unittest.cc
|
| diff --git a/cc/surfaces/surface_unittest.cc b/cc/surfaces/surface_unittest.cc
|
| index d4ac06e8f464cc4a57e3a99c34c906de31eaf20e..2c8135e87e4f782ae3d4bf4ed1a67b01a50b7581 100644
|
| --- a/cc/surfaces/surface_unittest.cc
|
| +++ b/cc/surfaces/surface_unittest.cc
|
| @@ -14,6 +14,9 @@
|
| namespace cc {
|
| namespace {
|
|
|
| +static constexpr uint32_t kArbitraryGpuId = 0;
|
| +static constexpr uint32_t kArbitraryClientId = 0;
|
| +
|
| class FakeSurfaceFactoryClient : public SurfaceFactoryClient {
|
| public:
|
| FakeSurfaceFactoryClient() : begin_frame_source_(nullptr) {}
|
| @@ -35,7 +38,7 @@ TEST(SurfaceTest, SurfaceLifetime) {
|
| FakeSurfaceFactoryClient surface_factory_client;
|
| SurfaceFactory factory(&manager, &surface_factory_client);
|
|
|
| - SurfaceId surface_id(0, 6, 0);
|
| + SurfaceId surface_id(kArbitraryGpuId, kArbitraryClientId, 6, 0);
|
| {
|
| factory.Create(surface_id);
|
| EXPECT_TRUE(manager.GetSurfaceForId(surface_id));
|
| @@ -46,14 +49,14 @@ TEST(SurfaceTest, SurfaceLifetime) {
|
| }
|
|
|
| TEST(SurfaceTest, SurfaceIds) {
|
| - uint32_t namespaces[] = {0u, 37u, ~0u};
|
| + uint32_t client_ids[] = {0u, 37u, ~0u};
|
| for (size_t i = 0; i < 3; ++i) {
|
| - uint32_t id_namespace = namespaces[i];
|
| - SurfaceIdAllocator allocator(id_namespace);
|
| + uint32_t client_id = client_ids[i];
|
| + SurfaceIdAllocator allocator(kArbitraryGpuId, client_id);
|
| SurfaceId id1 = allocator.GenerateId();
|
| - EXPECT_EQ(id1.id_namespace(), id_namespace);
|
| + EXPECT_EQ(id1.client_id(), client_id);
|
| SurfaceId id2 = allocator.GenerateId();
|
| - EXPECT_EQ(id2.id_namespace(), id_namespace);
|
| + EXPECT_EQ(id2.client_id(), client_id);
|
| EXPECT_NE(id1.local_id(), id2.local_id());
|
| EXPECT_NE(id1.nonce(), id2.nonce());
|
| }
|
|
|