| Index: components/exo/surface_unittest.cc
|
| diff --git a/components/exo/surface_unittest.cc b/components/exo/surface_unittest.cc
|
| index 570e4acc075f2dd03a7c9ac3063e76fca51e88c8..2e82a57a858016ac59592b05b5d916e7e8215b4f 100644
|
| --- a/components/exo/surface_unittest.cc
|
| +++ b/components/exo/surface_unittest.cc
|
| @@ -50,6 +50,11 @@ TEST_F(SurfaceTest, Attach) {
|
| // attached buffer.
|
| surface->Attach(nullptr);
|
| surface->Commit();
|
| + // CompositorFrameSinkHolder::ReclaimResources() gets called via
|
| + // MojoCompositorFrameSinkClient interface. We need to wait here for the mojo
|
| + // call to finish so that the release callback finishes running before
|
| + // the assertion below.
|
| + RunAllPendingInMessageLoop();
|
| ASSERT_EQ(1, release_buffer_call_count);
|
| }
|
|
|
| @@ -205,6 +210,7 @@ TEST_F(SurfaceTest, SetBlendMode) {
|
| surface->Attach(buffer.get());
|
| surface->SetBlendMode(SkBlendMode::kSrc);
|
| surface->Commit();
|
| + RunAllPendingInMessageLoop();
|
|
|
| const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get());
|
| ASSERT_EQ(1u, frame.render_pass_list.size());
|
| @@ -222,6 +228,7 @@ TEST_F(SurfaceTest, OverlayCandidate) {
|
|
|
| surface->Attach(buffer.get());
|
| surface->Commit();
|
| + RunAllPendingInMessageLoop();
|
|
|
| const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get());
|
| ASSERT_EQ(1u, frame.render_pass_list.size());
|
|
|