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

Unified Diff: mojo/shell/desktop/mojo_main.cc

Issue 313653005: Mojo: Add an extremely skeletal mojo_shell_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get rid of extraneous mojo::(shell::)s Created 6 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
« no previous file with comments | « mojo/shell/child_process_host_unittest.cc ('k') | mojo/shell/shell_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/desktop/mojo_main.cc
diff --git a/mojo/shell/desktop/mojo_main.cc b/mojo/shell/desktop/mojo_main.cc
index f2ef50af27d406b1336b659e04c1a2ee88ac887a..ee5880011e9a65d1bb0c9c2917cdb7eee33aeb63 100644
--- a/mojo/shell/desktop/mojo_main.cc
+++ b/mojo/shell/desktop/mojo_main.cc
@@ -5,60 +5,21 @@
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/macros.h" // TODO(vtl): Remove.
#include "base/message_loop/message_loop.h"
-#include "mojo/common/message_pump_mojo.h" // TODO(vtl): Remove.
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/shell/child_process.h"
-#include "mojo/shell/child_process_host.h" // TODO(vtl): Remove.
#include "mojo/shell/context.h"
#include "mojo/shell/init.h"
#include "mojo/shell/run.h"
#include "mojo/shell/switches.h"
#include "ui/gl/gl_surface.h"
-namespace {
-
-// TODO(vtl): Remove.
-class TestChildProcessHostDelegate
- : public mojo::shell::ChildProcessHost::Delegate {
- public:
- TestChildProcessHostDelegate() {}
- virtual ~TestChildProcessHostDelegate() {}
- virtual void WillStart() OVERRIDE {
- VLOG(2) << "TestChildProcessHostDelegate::WillStart()";
- }
- virtual void DidStart(bool success) OVERRIDE {
- VLOG(2) << "TestChildProcessHostDelegate::DidStart(" << success << ")";
- base::MessageLoop::current()->QuitWhenIdle();
- }
-};
-
-} // namespace
-
int main(int argc, char** argv) {
base::AtExitManager at_exit;
mojo::Environment env;
base::CommandLine::Init(argc, argv);
mojo::shell::InitializeLogging();
- // TODO(vtl): Move this a proper test (and remove includes marked "remove").
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("run-test-child")) {
- base::MessageLoop message_loop(
- scoped_ptr<base::MessagePump>(new mojo::common::MessagePumpMojo()));
-
- mojo::shell::Context context;
- TestChildProcessHostDelegate child_process_host_delegate;
- mojo::shell::ChildProcessHost child_process_host(
- &context, &child_process_host_delegate,
- mojo::shell::ChildProcess::TYPE_TEST);
- child_process_host.Start();
- message_loop.Run();
- int exit_code = child_process_host.Join();
- VLOG(2) << "Joined child: exit_code = " << exit_code;
- return 0;
- }
-
// TODO(vtl): Unify parent and child process cases to the extent possible.
if (scoped_ptr<mojo::shell::ChildProcess> child_process =
mojo::shell::ChildProcess::Create(
« no previous file with comments | « mojo/shell/child_process_host_unittest.cc ('k') | mojo/shell/shell_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698