Index: services/shell/tests/shutdown/shutdown_client_app.cc |
diff --git a/services/shell/tests/shutdown/shutdown_client_app.cc b/services/shell/tests/shutdown/shutdown_client_app.cc |
index a7f630f5d8c9b332f559f3f760234fb65e912fb5..21bf737e1e1d95fc3f1011b3c43cf0ce0dbf6f22 100644 |
--- a/services/shell/tests/shutdown/shutdown_client_app.cc |
+++ b/services/shell/tests/shutdown/shutdown_client_app.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/macros.h" |
+#include "base/run_loop.h" |
#include "mojo/public/c/system/main.h" |
#include "mojo/public/cpp/bindings/binding_set.h" |
#include "services/shell/public/cpp/application_runner.h" |
@@ -52,7 +53,12 @@ class ShutdownClientApp |
service->SetClient(std::move(client_ptr)); |
- client_binding.WaitForIncomingMethodCall(); |
+ base::MessageLoop::ScopedNestableTaskAllower nestable_allower( |
+ base::MessageLoop::current()); |
+ base::RunLoop run_loop; |
+ client_binding.set_connection_error_handler(run_loop.QuitClosure()); |
+ run_loop.Run(); |
+ |
callback.Run(); |
} |