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 APPS_TEST_APP_SHELL_TEST_H_ | 5 #ifndef APPS_SHELL_TEST_SHELL_TEST_H_ |
6 #define APPS_TEST_APP_SHELL_TEST_H_ | 6 #define APPS_SHELL_TEST_SHELL_TEST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/public/test/browser_test.h" | 9 #include "content/public/test/browser_test.h" |
10 #include "content/public/test/browser_test_base.h" | 10 #include "content/public/test/browser_test_base.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class FilePath; | 13 class FilePath; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class BrowserContext; | 17 class BrowserContext; |
18 } | 18 } |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 class ShellExtensionSystem; | 21 class ShellExtensionSystem; |
22 } | 22 } |
23 | 23 |
24 namespace apps { | 24 namespace apps { |
25 | 25 |
26 // Base class for app shell browser tests. | 26 // Base class for app shell browser tests. |
27 class AppShellTest : public content::BrowserTestBase { | 27 class AppShellTest : public content::BrowserTestBase { |
28 public: | 28 public: |
29 AppShellTest(); | 29 AppShellTest(); |
30 virtual ~AppShellTest(); | 30 virtual ~AppShellTest(); |
31 | 31 |
| 32 // content::BrowserTestBase implementation. |
| 33 virtual void SetUp() OVERRIDE; |
32 virtual void SetUpOnMainThread() OVERRIDE; | 34 virtual void SetUpOnMainThread() OVERRIDE; |
33 virtual void RunTestOnMainThreadLoop() OVERRIDE; | 35 virtual void RunTestOnMainThreadLoop() OVERRIDE; |
34 | 36 |
35 // Loads an unpacked application from a directory using |extension_system_| | 37 // Loads an unpacked application from a directory using |extension_system_| |
36 // and attempts to launch it. Returns true on success. | 38 // and attempts to launch it. Returns true on success. |
37 bool LoadAndLaunchApp(const base::FilePath& app_dir); | 39 bool LoadAndLaunchApp(const base::FilePath& app_dir); |
38 | 40 |
39 content::BrowserContext* browser_context() { return browser_context_; } | 41 content::BrowserContext* browser_context() { return browser_context_; } |
40 | 42 |
41 private: | 43 private: |
42 content::BrowserContext* browser_context_; | 44 content::BrowserContext* browser_context_; |
43 extensions::ShellExtensionSystem* extension_system_; | 45 extensions::ShellExtensionSystem* extension_system_; |
44 }; | 46 }; |
45 | 47 |
46 } // namespace apps | 48 } // namespace apps |
47 | 49 |
48 #endif // APPS_TEST_APP_SHELL_TEST_H_ | 50 #endif // APPS_SHELL_TEST_SHELL_TEST_H_ |
OLD | NEW |