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

Unified Diff: mojo/shell/shell_test_helper.h

Issue 308053008: Simplifies ShellTestHelper and ViewManager tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to trunk 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/services/view_manager/view_manager_connection_unittest.cc ('k') | mojo/shell/shell_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell_test_helper.h
diff --git a/mojo/shell/shell_test_helper.h b/mojo/shell/shell_test_helper.h
index 56ed4b17a4e963cdf87e0ad67efd2e4531f0d07e..04a4df5869f1f3a698dc8643fe23466f9ef1e910 100644
--- a/mojo/shell/shell_test_helper.h
+++ b/mojo/shell/shell_test_helper.h
@@ -8,17 +8,13 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
-#include "base/threading/thread.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
+#include "mojo/service_manager/service_loader.h"
+#include "mojo/shell/context.h"
class GURL;
-namespace base {
-class MessageLoopProxy;
-class RunLoop;
-}
-
namespace mojo {
class ServiceLoader;
@@ -26,13 +22,10 @@ class ServiceLoader;
namespace shell {
// ShellTestHelper is useful for tests to establish a connection to the
-// ServiceProvider. ShellTestHelper does this by spawning a thread and
-// connecting. Invoke Init() to do this. Once done, service_provider()
-// returns the handle to the ServiceProvider.
+// ServiceProvider. Invoke Init() to establish the connection. Once done,
+// service_provider() returns the handle to the ServiceProvider.
class ShellTestHelper {
public:
- struct State;
-
ShellTestHelper();
~ShellTestHelper();
@@ -49,18 +42,13 @@ class ShellTestHelper {
private:
class TestServiceProvider;
- // Invoked once connection has been established.
- void OnServiceProviderStarted();
-
Environment environment_;
- base::Thread service_provider_thread_;
+ scoped_ptr<Context> context_;
- // If non-null we're in Init() and waiting for connection.
- scoped_ptr<base::RunLoop> run_loop_;
+ scoped_ptr<ServiceManager::TestAPI> test_api_;
- // See comment in declaration for details.
- State* state_;
+ // ScopedMessagePipeHandle service_provider_handle_;
// Client interface for the shell.
scoped_ptr<TestServiceProvider> local_service_provider_;
« no previous file with comments | « mojo/services/view_manager/view_manager_connection_unittest.cc ('k') | mojo/shell/shell_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698