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

Unified Diff: ui/views/mus/platform_test_helper_mus.cc

Issue 1797153002: Reinstate wait-for-Initialize when Chrome is run in Mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell-client
Patch Set: fix views_mus_unittests too Created 4 years, 9 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
« no previous file with comments | « mojo/shell/public/cpp/shell_connection.h ('k') | ui/views/mus/screen_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/platform_test_helper_mus.cc
diff --git a/ui/views/mus/platform_test_helper_mus.cc b/ui/views/mus/platform_test_helper_mus.cc
index 87712e128afa517a247f786f04c405a557925b61..80e6a74a1ec75139ff3ec0c8fc316fcba48e6513 100644
--- a/ui/views/mus/platform_test_helper_mus.cc
+++ b/ui/views/mus/platform_test_helper_mus.cc
@@ -5,6 +5,7 @@
#include "ui/views/test/platform_test_helper.h"
#include "base/command_line.h"
+#include "base/run_loop.h"
#include "mojo/shell/background/background_shell.h"
#include "mojo/shell/background/tests/test_catalog_store.h"
#include "mojo/shell/public/cpp/connector.h"
@@ -49,6 +50,12 @@ class PlatformTestHelperMus : public PlatformTestHelper {
shell_connection_.reset(new mojo::ShellConnection(
shell_client_.get(),
background_shell_->CreateShellClientRequest(kTestName)));
+
+ // TODO(rockot): Remove this RunLoop. http://crbug.com/594852.
+ base::RunLoop wait_loop;
+ shell_connection_->set_initialize_handler(wait_loop.QuitClosure());
+ wait_loop.Run();
+
// ui/views/mus requires a WindowManager running, for now use the desktop
// one.
mojo::Connector* connector = shell_connection_->connector();
« no previous file with comments | « mojo/shell/public/cpp/shell_connection.h ('k') | ui/views/mus/screen_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698