Index: cc/surfaces/surface_hittest_unittest.cc |
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc |
index 6f0637f41a485048040e4338c47a78215daafe4d..b600e437fc6118d7a7c6ff596770e3864715ff01 100644 |
--- a/cc/surfaces/surface_hittest_unittest.cc |
+++ b/cc/surfaces/surface_hittest_unittest.cc |
@@ -20,6 +20,8 @@ namespace cc { |
namespace { |
+static constexpr uint32_t kArbitraryClientId = 1; |
+ |
struct TestCase { |
SurfaceId input_surface_id; |
gfx::Point input_point; |
@@ -61,7 +63,7 @@ using namespace test; |
TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Creates a root surface. |
gfx::Rect root_rect(300, 300); |
@@ -78,7 +80,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryClientId); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -99,7 +101,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) { |
TEST(SurfaceHittestTest, Hittest_SingleSurface) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Creates a root surface. |
gfx::Rect root_rect(300, 300); |
@@ -107,7 +109,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) { |
CompositorFrame root_frame = CreateCompositorFrame(root_rect, &root_pass); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryClientId); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -129,7 +131,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) { |
TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Creates a root surface. |
gfx::Rect root_rect(300, 300); |
@@ -150,7 +152,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryClientId); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -260,7 +262,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) { |
TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Creates a root surface. |
gfx::Rect root_rect(300, 300); |
@@ -288,7 +290,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
child_surface_id); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(2); |
+ SurfaceIdAllocator root_allocator(kArbitraryClientId); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -361,7 +363,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) { |
TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Create a CompostiorFrame with two RenderPasses. |
gfx::Rect root_rect(300, 300); |
@@ -406,7 +408,7 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { |
child_solid_quad_rect); |
// Submit the root frame. |
- SurfaceIdAllocator root_allocator(1); |
+ SurfaceIdAllocator root_allocator(kArbitraryClientId); |
SurfaceId root_surface_id = root_allocator.GenerateId(); |
factory.Create(root_surface_id); |
factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame), |
@@ -464,7 +466,7 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) { |
TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) { |
SurfaceManager manager; |
EmptySurfaceFactoryClient client; |
- SurfaceFactory factory(&manager, &client); |
+ SurfaceFactory factory(kArbitraryClientId, &manager, &client); |
// Creates a root surface. |
gfx::Rect root_rect(300, 300); |