| Index: cc/surfaces/surface_hittest_unittest.cc
|
| diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
|
| index 2c04b2a731c695e3ea1bb05edcb5599d1115d62b..35152ec5201ae593f3b051fb54bcbd1d03992362 100644
|
| --- a/cc/surfaces/surface_hittest_unittest.cc
|
| +++ b/cc/surfaces/surface_hittest_unittest.cc
|
| @@ -86,7 +86,6 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -98,8 +97,6 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) {
|
| hittest.GetTargetSurfaceAtPoint(
|
| root_surface_id, gfx::Point(100, 100), &transform));
|
| }
|
| -
|
| - root_factory.Destroy(root_local_frame_id);
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
| @@ -119,7 +116,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
| TestCase tests[] = {
|
| @@ -132,8 +128,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
|
| };
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
| -
|
| - root_factory.Destroy(root_local_frame_id);
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| @@ -172,7 +166,6 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -191,7 +184,6 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| root_rect, child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -271,9 +263,6 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
|
| EXPECT_NE(transform, target_transform);
|
| EXPECT_EQ(gfx::Point(25, 25), point_in_target_space);
|
| }
|
| -
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| }
|
|
|
| // This test verifies that hit testing will progress to the next quad if it
|
| @@ -321,7 +310,6 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -340,7 +328,6 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
| child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -385,9 +372,6 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
|
| };
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
| -
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
| @@ -440,7 +424,6 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - factory.Create(root_local_frame_id);
|
| factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -489,8 +472,6 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
|
| };
|
|
|
| RunTests(nullptr, &manager, tests, arraysize(tests));
|
| -
|
| - factory.Destroy(root_local_frame_id);
|
| }
|
|
|
| TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| @@ -528,7 +509,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| SurfaceIdAllocator root_allocator;
|
| LocalFrameId root_local_frame_id = root_allocator.GenerateId();
|
| SurfaceId root_surface_id(root_frame_sink_id, root_local_frame_id);
|
| - root_factory.Create(root_local_frame_id);
|
| root_factory.SubmitCompositorFrame(root_local_frame_id, std::move(root_frame),
|
| SurfaceFactory::DrawCallback());
|
|
|
| @@ -545,7 +525,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| root_rect, child_solid_quad_rect);
|
|
|
| // Submit the frame.
|
| - child_factory.Create(child_local_frame_id);
|
| child_factory.SubmitCompositorFrame(child_local_frame_id,
|
| std::move(child_frame),
|
| SurfaceFactory::DrawCallback());
|
| @@ -626,9 +605,6 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
|
| // Verify that insets have affected hit targeting.
|
| EXPECT_EQ(0, accept_delegate.reject_target_overrides());
|
| EXPECT_EQ(2, accept_delegate.accept_target_overrides());
|
| -
|
| - root_factory.Destroy(root_local_frame_id);
|
| - child_factory.Destroy(child_local_frame_id);
|
| }
|
|
|
| } // namespace cc
|
|
|