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

Unified Diff: mojo/application/application_test_main_chromium.cc

Issue 695593002: Add Chromium environment application test support. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync and rebase. Created 6 years, 2 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/application/BUILD.gn ('k') | mojo/environment/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/application_test_main_chromium.cc
diff --git a/mojo/public/cpp/application/lib/application_test_main.cc b/mojo/application/application_test_main_chromium.cc
similarity index 92%
copy from mojo/public/cpp/application/lib/application_test_main.cc
copy to mojo/application/application_test_main_chromium.cc
index be4e54ef1125c371740cfc3210be9f818919849b..0502689ac4b771d47e1f68a45b92ca065d1d43e8 100644
--- a/mojo/public/cpp/application/lib/application_test_main.cc
+++ b/mojo/application/application_test_main_chromium.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/at_exit.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
@@ -10,7 +11,10 @@
#include "mojo/public/cpp/system/message_pipe.h"
MojoResult MojoMain(MojoHandle shell_handle) {
- mojo::Environment environment;
+#if !defined(COMPONENT_BUILD)
+ // An AtExitManager instance is needed to construct message loops.
+ base::AtExitManager at_exit;
+#endif
{
// This RunLoop is used for init, and then destroyed before running tests.
« no previous file with comments | « mojo/application/BUILD.gn ('k') | mojo/environment/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698