OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SHELL_SHELL_TEST_HELPER_H_ | 5 #ifndef SHELL_SHELL_TEST_HELPER_H_ |
6 #define SHELL_SHELL_TEST_HELPER_H_ | 6 #define SHELL_SHELL_TEST_HELPER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "shell/application_manager/application_loader.h" | 11 #include "shell/application_manager/application_loader.h" |
12 #include "shell/context.h" | 12 #include "shell/context.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace mojo { | |
17 namespace shell { | 16 namespace shell { |
18 | 17 |
19 // ShellTestHelper is useful for tests to establish a connection to the | 18 // ShellTestHelper is useful for tests to establish a connection to the |
20 // ApplicationManager. Invoke Init() to establish the connection. Once done, | 19 // ApplicationManager. Invoke Init() to establish the connection. Once done, |
21 // application_manager() returns the ApplicationManager. | 20 // application_manager() returns the ApplicationManager. |
22 class ShellTestHelper { | 21 class ShellTestHelper { |
23 public: | 22 public: |
24 ShellTestHelper(); | 23 ShellTestHelper(); |
25 ~ShellTestHelper(); | 24 ~ShellTestHelper(); |
26 | 25 |
(...skipping 13 matching lines...) Expand all Loading... |
40 void AddURLMapping(const GURL& url, const GURL& resolved_url); | 39 void AddURLMapping(const GURL& url, const GURL& resolved_url); |
41 | 40 |
42 private: | 41 private: |
43 Context context_; | 42 Context context_; |
44 base::MessageLoop shell_loop_; | 43 base::MessageLoop shell_loop_; |
45 scoped_ptr<ApplicationManager::TestAPI> test_api_; | 44 scoped_ptr<ApplicationManager::TestAPI> test_api_; |
46 DISALLOW_COPY_AND_ASSIGN(ShellTestHelper); | 45 DISALLOW_COPY_AND_ASSIGN(ShellTestHelper); |
47 }; | 46 }; |
48 | 47 |
49 } // namespace shell | 48 } // namespace shell |
50 } // namespace mojo | |
51 | 49 |
52 #endif // SHELL_SHELL_TEST_HELPER_H_ | 50 #endif // SHELL_SHELL_TEST_HELPER_H_ |
OLD | NEW |