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

Unified Diff: components/exo/surface_unittest.cc

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Override DesktopMediaListAshTest::TearDown() to reset list_ Created 4 years 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
« no previous file with comments | « components/exo/surface.cc ('k') | components/exo/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « components/exo/surface.cc ('k') | components/exo/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698