| Index: mojo/shell/shell_test_base.h
|
| diff --git a/mojo/shell/shell_test_base.h b/mojo/shell/shell_test_base.h
|
| index afaf27c1e973cd95c634d6f7cfb14fe856bc5b26..639a0a7c144c051d1f8d1b31942936d1d53853c8 100644
|
| --- a/mojo/shell/shell_test_base.h
|
| +++ b/mojo/shell/shell_test_base.h
|
| @@ -5,13 +5,25 @@
|
| #ifndef MOJO_SHELL_SHELL_TEST_BASE_H_
|
| #define MOJO_SHELL_SHELL_TEST_BASE_H_
|
|
|
| -#include "base/at_exit.h"
|
| +#include <string>
|
| +
|
| #include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "mojo/public/cpp/environment/environment.h"
|
| +#include "mojo/public/cpp/system/core.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 {
|
| @@ -19,15 +31,31 @@ 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(); }
|
| +
|
| private:
|
| - base::ShadowingAtExitManager at_exit_manager_;
|
| Environment environment_;
|
|
|
| + // Only set if/when |InitMojo()| is called.
|
| + scoped_ptr<base::MessageLoop> message_loop_;
|
| + scoped_ptr<Context> shell_context_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ShellTestBase);
|
| };
|
|
|
| } // namespace test
|
| +
|
| } // namespace shell
|
| } // namespace mojo
|
|
|
| -#endif // MOJO_SYSTEM_SHELL_SHELLASE_H_
|
| +#endif // MOJO_SHELL_SHELL_TEST_BASE_H_
|
|
|