| 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 "apps/app_window.h" | 8 #include "apps/app_window.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
| 11 | 11 |
| 12 namespace base { |
| 13 class CommandLine; |
| 14 } |
| 15 |
| 12 namespace content { | 16 namespace content { |
| 13 class WebContents; | 17 class WebContents; |
| 14 } | 18 } |
| 15 | 19 |
| 16 class Browser; | 20 class Browser; |
| 17 class CommandLine; | |
| 18 | 21 |
| 19 namespace extensions { | 22 namespace extensions { |
| 20 class Extension; | 23 class Extension; |
| 21 | 24 |
| 22 class PlatformAppBrowserTest : public ExtensionApiTest { | 25 class PlatformAppBrowserTest : public ExtensionApiTest { |
| 23 public: | 26 public: |
| 24 PlatformAppBrowserTest(); | 27 PlatformAppBrowserTest(); |
| 25 | 28 |
| 26 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 29 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
| 27 | 30 |
| 28 // 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. |
| 29 static apps::AppWindow* GetFirstAppWindowForBrowser(Browser* browser); | 32 static apps::AppWindow* GetFirstAppWindowForBrowser(Browser* browser); |
| 30 | 33 |
| 31 protected: | 34 protected: |
| 32 // 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 |
| 33 // until it is launched. | 36 // until it is launched. |
| 34 const Extension* LoadAndLaunchPlatformApp(const char* name); | 37 const Extension* LoadAndLaunchPlatformApp(const char* name); |
| 35 | 38 |
| 36 // Installs the app named |name| out of the platform_apps subdirectory. | 39 // Installs the app named |name| out of the platform_apps subdirectory. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Load a simple test app and create a window. The window must be closed by | 103 // Load a simple test app and create a window. The window must be closed by |
| 101 // the caller in order to terminate the test - use CloseAppWindow(). | 104 // the caller in order to terminate the test - use CloseAppWindow(). |
| 102 // |window_create_options| are the options that will be passed to | 105 // |window_create_options| are the options that will be passed to |
| 103 // chrome.app.window.create() in the test app. | 106 // chrome.app.window.create() in the test app. |
| 104 apps::AppWindow* CreateTestAppWindow( | 107 apps::AppWindow* CreateTestAppWindow( |
| 105 const std::string& window_create_options); | 108 const std::string& window_create_options); |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { | 111 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { |
| 109 public: | 112 public: |
| 110 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 113 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
| 111 }; | 114 }; |
| 112 | 115 |
| 113 } // namespace extensions | 116 } // namespace extensions |
| 114 | 117 |
| 115 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 118 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
| OLD | NEW |