OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
6 #define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 6 #define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "extensions/browser/app_window/app_window.h" | 9 #include "extensions/browser/app_window/app_window.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class CommandLine; | 12 class CommandLine; |
13 } | 13 } |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 | 18 |
19 class Browser; | 19 class Browser; |
20 class ExtensionTestMessageListener; | 20 class ExtensionTestMessageListener; |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 class Extension; | 23 class Extension; |
24 | 24 |
25 class PlatformAppBrowserTest : public ExtensionApiTest { | 25 class PlatformAppBrowserTest : public ExtensionApiTest { |
26 public: | 26 public: |
27 PlatformAppBrowserTest(); | 27 PlatformAppBrowserTest(); |
28 | 28 |
29 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 29 virtual void SetUpCommandLine(base::CommandLine* command_line) override; |
30 | 30 |
31 // Gets the first app window that is found for a given browser. | 31 // Gets the first app window that is found for a given browser. |
32 static AppWindow* GetFirstAppWindowForBrowser(Browser* browser); | 32 static AppWindow* GetFirstAppWindowForBrowser(Browser* browser); |
33 | 33 |
34 protected: | 34 protected: |
35 // Runs the app named |name| out of the platform_apps subdirectory. Waits | 35 // Runs the app named |name| out of the platform_apps subdirectory. Waits |
36 // for the provided listener to be satisifed. | 36 // for the provided listener to be satisifed. |
37 const Extension* LoadAndLaunchPlatformApp( | 37 const Extension* LoadAndLaunchPlatformApp( |
38 const char* name, | 38 const char* name, |
39 ExtensionTestMessageListener* listener); | 39 ExtensionTestMessageListener* listener); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // |window_create_options| are the options that will be passed to | 111 // |window_create_options| are the options that will be passed to |
112 // chrome.app.window.create() in the test app. | 112 // chrome.app.window.create() in the test app. |
113 AppWindow* CreateTestAppWindow(const std::string& window_create_options); | 113 AppWindow* CreateTestAppWindow(const std::string& window_create_options); |
114 | 114 |
115 private: | 115 private: |
116 DISALLOW_COPY_AND_ASSIGN(PlatformAppBrowserTest); | 116 DISALLOW_COPY_AND_ASSIGN(PlatformAppBrowserTest); |
117 }; | 117 }; |
118 | 118 |
119 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { | 119 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { |
120 public: | 120 public: |
121 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 121 virtual void SetUpCommandLine(base::CommandLine* command_line) override; |
122 }; | 122 }; |
123 | 123 |
124 } // namespace extensions | 124 } // namespace extensions |
125 | 125 |
126 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 126 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
OLD | NEW |