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

Unified Diff: media/base/bind_to_current_loop_unittest.cc

Issue 2869733005: Convert some audio code to OnceCallback. (Closed)
Patch Set: Fix BindToCurrentLoop issues Created 3 years, 7 months 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
Index: media/base/bind_to_current_loop_unittest.cc
diff --git a/media/base/bind_to_current_loop_unittest.cc b/media/base/bind_to_current_loop_unittest.cc
index b0f5cdef436f875d94230bceb99f60b5e8b9a6ef..dc695fa192815fabfdb4ecf186ab596007ef8e14 100644
--- a/media/base/bind_to_current_loop_unittest.cc
+++ b/media/base/bind_to_current_loop_unittest.cc
@@ -222,4 +222,12 @@ TEST_F(BindToCurrentLoopTest, DestroyedOnBoundLoop) {
target_thread.Stop();
}
+TEST_F(BindToCurrentLoopTest, SeveralCalls) {
+ base::Closure cl = base::Bind([]() {});
+ base::Closure bound_cl = BindToCurrentLoop(std::move(cl));
+ bound_cl.Run();
+ bound_cl.Run();
+ base::RunLoop().RunUntilIdle();
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698