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 | 8 |
9 #include "apps/shell_window.h" | 9 #include "apps/shell_window.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 public: | 22 public: |
23 PlatformAppBrowserTest(); | 23 PlatformAppBrowserTest(); |
24 | 24 |
25 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 25 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
26 | 26 |
27 protected: | 27 protected: |
28 // Runs the app named |name| out of the platform_apps subdirectory. Waits | 28 // Runs the app named |name| out of the platform_apps subdirectory. Waits |
29 // until it is launched. | 29 // until it is launched. |
30 const Extension* LoadAndLaunchPlatformApp(const char* name); | 30 const Extension* LoadAndLaunchPlatformApp(const char* name); |
31 | 31 |
32 // Installs the app named |name| out of the platform_apps subdirectory. | |
33 const Extension* InstallPlatformApp(const char* name); | |
34 | |
32 // Installs and runs the app named |name| out of the platform_apps | 35 // Installs and runs the app named |name| out of the platform_apps |
33 // subdirectory. Waits until it is launched. | 36 // subdirectory. Waits until it is launched. |
34 const Extension* InstallAndLaunchPlatformApp(const char* name); | 37 const Extension* InstallAndLaunchPlatformApp(const char* name); |
35 | 38 |
36 // Gets the WebContents associated with the first shell window that is found | 39 // Gets the WebContents associated with the first shell window that is found |
37 // (most tests only deal with one platform app window, so this is good | 40 // (most tests only deal with one platform app window, so this is good |
38 // enough). | 41 // enough). |
39 content::WebContents* GetFirstShellWindowWebContents(); | 42 content::WebContents* GetFirstShellWindowWebContents(); |
40 | 43 |
41 // Gets the first shell window that is found (most tests only deal with one | 44 // Gets the first shell window that is found (most tests only deal with one |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 const gfx::Rect& current_screen_bounds, | 83 const gfx::Rect& current_screen_bounds, |
81 const gfx::Size& minimum_size, | 84 const gfx::Size& minimum_size, |
82 gfx::Rect* bounds); | 85 gfx::Rect* bounds); |
83 }; | 86 }; |
84 | 87 |
85 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { | 88 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { |
86 public: | 89 public: |
87 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 90 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
88 }; | 91 }; |
89 | 92 |
93 class PlatformAppUrlRedirectorBrowserTest : public PlatformAppBrowserTest { | |
benwells
2013/09/09 05:48:39
Is there a reason this class is in this module? It
sergeygs
2013/09/09 09:55:36
No real reason, it just seemed to make sense. Move
| |
94 public: | |
95 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | |
96 | |
97 protected: | |
98 void TestNavigationInTab(const char* launcher_page_path, | |
99 const char* handler_path, | |
100 const char* handler_ack, | |
101 size_t expected_shell_window_count); | |
102 void TestNavigationInApp(const char* launcher_path, | |
103 const char* launcher_ack, | |
104 const char* handler_path, | |
105 const char* handler_ack, | |
106 size_t expected_shell_window_count); | |
107 }; | |
108 | |
90 } // namespace extensions | 109 } // namespace extensions |
91 | 110 |
92 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 111 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
OLD | NEW |