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

Unified Diff: mojo/shell/shell_test_base.h

Issue 343843002: mojo: remove need for ShellTestBase::InitMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell_test_base.h
diff --git a/mojo/shell/shell_test_base.h b/mojo/shell/shell_test_base.h
index 84864b7300f327381d0e4003dc1b621361c495c7..57e2cf73fcbd7b64885aa22fde540f7807d6e926 100644
--- a/mojo/shell/shell_test_base.h
+++ b/mojo/shell/shell_test_base.h
@@ -8,21 +8,15 @@
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "mojo/public/cpp/system/core.h"
+#include "mojo/shell/context.h"
#include "testing/gtest/include/gtest/gtest.h"
class GURL;
-namespace base {
-class MessageLoop;
-}
-
namespace mojo {
namespace shell {
-
-class Context;
-
namespace test {
class ShellTestBase : public testing::Test {
@@ -30,28 +24,23 @@ class ShellTestBase : public testing::Test {
ShellTestBase();
virtual ~ShellTestBase();
- // Should be called before any of the methods below are called.
- void InitMojo();
-
// Launches the given service in-process; |service_url| should typically be a
// mojo: URL (the origin will be set to an "appropriate" file: URL).
void LaunchServiceInProcess(const GURL& service_url,
const std::string& service_name,
ScopedMessagePipeHandle client_handle);
- base::MessageLoop* message_loop() { return message_loop_.get(); }
- Context* shell_context() { return shell_context_.get(); }
+ base::MessageLoop* message_loop() { return &message_loop_; }
+ Context* shell_context() { return &shell_context_; }
private:
- // Only set if/when |InitMojo()| is called.
- scoped_ptr<base::MessageLoop> message_loop_;
- scoped_ptr<Context> shell_context_;
+ base::MessageLoop message_loop_;
+ Context shell_context_;
DISALLOW_COPY_AND_ASSIGN(ShellTestBase);
};
} // namespace test
-
} // namespace shell
} // namespace mojo
« no previous file with comments | « mojo/shell/child_process_host_unittest.cc ('k') | mojo/shell/shell_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698