| 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 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ExtensionTestMessageListener* listener); | 39 ExtensionTestMessageListener* listener); |
| 40 | 40 |
| 41 // Runs the app named |name| out of the platform_apps subdirectory. Waits | 41 // Runs the app named |name| out of the platform_apps subdirectory. Waits |
| 42 // until the given message is received from the app. | 42 // until the given message is received from the app. |
| 43 const Extension* LoadAndLaunchPlatformApp(const char* name, | 43 const Extension* LoadAndLaunchPlatformApp(const char* name, |
| 44 const std::string& message); | 44 const std::string& message); |
| 45 | 45 |
| 46 // Installs the app named |name| out of the platform_apps subdirectory. | 46 // Installs the app named |name| out of the platform_apps subdirectory. |
| 47 const Extension* InstallPlatformApp(const char* name); | 47 const Extension* InstallPlatformApp(const char* name); |
| 48 | 48 |
| 49 // Installs the sample hosted app. |
| 50 const Extension* InstallHostedApp(); |
| 51 |
| 49 // Installs and runs the app named |name| out of the platform_apps | 52 // Installs and runs the app named |name| out of the platform_apps |
| 50 // subdirectory. Waits until it is launched. | 53 // subdirectory. Waits until it is launched. |
| 51 const Extension* InstallAndLaunchPlatformApp(const char* name); | 54 const Extension* InstallAndLaunchPlatformApp(const char* name); |
| 52 | 55 |
| 53 // Launch the given platform app. | 56 // Launch the given platform app. |
| 54 virtual void LaunchPlatformApp(const Extension* extension); | 57 virtual void LaunchPlatformApp(const Extension* extension); |
| 55 | 58 |
| 59 // Launch the given hosted app. |
| 60 virtual void LaunchHostedApp(const Extension* extension); |
| 61 |
| 56 // Gets the WebContents associated with the first app window that is found | 62 // Gets the WebContents associated with the first app window that is found |
| 57 // (most tests only deal with one platform app window, so this is good | 63 // (most tests only deal with one platform app window, so this is good |
| 58 // enough). | 64 // enough). |
| 59 content::WebContents* GetFirstAppWindowWebContents(); | 65 content::WebContents* GetFirstAppWindowWebContents(); |
| 60 | 66 |
| 61 // Gets the first app window that is found (most tests only deal with one | 67 // Gets the first app window that is found (most tests only deal with one |
| 62 // platform app window, so this is good enough). | 68 // platform app window, so this is good enough). |
| 63 AppWindow* GetFirstAppWindow(); | 69 AppWindow* GetFirstAppWindow(); |
| 64 | 70 |
| 65 // Gets the first app window for an app. | 71 // Gets the first app window for an app. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 }; | 123 }; |
| 118 | 124 |
| 119 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { | 125 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { |
| 120 public: | 126 public: |
| 121 void SetUpCommandLine(base::CommandLine* command_line) override; | 127 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 122 }; | 128 }; |
| 123 | 129 |
| 124 } // namespace extensions | 130 } // namespace extensions |
| 125 | 131 |
| 126 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 132 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
| OLD | NEW |