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 #include "chrome/browser/apps/app_browsertest_util.h" | 5 #include "chrome/browser/apps/app_browsertest_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
10 #include "chrome/browser/extensions/extension_function_test_utils.h" | 10 #include "chrome/browser/extensions/extension_function_test_utils.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return extension; | 120 return extension; |
121 } | 121 } |
122 | 122 |
123 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { | 123 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { |
124 OpenApplication(AppLaunchParams(browser()->profile(), extension, | 124 OpenApplication(AppLaunchParams(browser()->profile(), extension, |
125 LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 125 LAUNCH_CONTAINER_NONE, NEW_WINDOW, |
126 extensions::SOURCE_TEST)); | 126 extensions::SOURCE_TEST)); |
127 } | 127 } |
128 | 128 |
129 void PlatformAppBrowserTest::LaunchHostedApp(const Extension* extension) { | 129 void PlatformAppBrowserTest::LaunchHostedApp(const Extension* extension) { |
130 AppLaunchParams launch_params(browser()->profile(), extension, | 130 OpenApplication(CreateAppLaunchParamsUserContainer( |
131 NEW_FOREGROUND_TAB, | 131 browser()->profile(), extension, NEW_FOREGROUND_TAB, |
132 extensions::SOURCE_COMMAND_LINE); | 132 extensions::SOURCE_COMMAND_LINE)); |
133 OpenApplication(launch_params); | |
134 } | 133 } |
135 | 134 |
136 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { | 135 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { |
137 AppWindow* window = GetFirstAppWindow(); | 136 AppWindow* window = GetFirstAppWindow(); |
138 if (window) | 137 if (window) |
139 return window->web_contents(); | 138 return window->web_contents(); |
140 | 139 |
141 return NULL; | 140 return NULL; |
142 } | 141 } |
143 | 142 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return app_window; | 257 return app_window; |
259 } | 258 } |
260 | 259 |
261 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( | 260 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( |
262 base::CommandLine* command_line) { | 261 base::CommandLine* command_line) { |
263 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 262 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
264 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 263 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
265 } | 264 } |
266 | 265 |
267 } // namespace extensions | 266 } // namespace extensions |
OLD | NEW |