| 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/apps/scoped_keep_alive.h" | 9 #include "chrome/browser/apps/scoped_keep_alive.h" |
| 10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 LaunchPlatformApp(extension); | 109 LaunchPlatformApp(extension); |
| 110 | 110 |
| 111 app_loaded_observer.Wait(); | 111 app_loaded_observer.Wait(); |
| 112 | 112 |
| 113 return extension; | 113 return extension; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { | 116 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { |
| 117 OpenApplication(AppLaunchParams(browser()->profile(), extension, | 117 OpenApplication(AppLaunchParams(browser()->profile(), extension, |
| 118 LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 118 LAUNCH_CONTAINER_NONE, NEW_WINDOW, |
| 119 extensions::SOURCE_UNTRACKED)); | 119 extensions::SOURCE_BROWSER_TEST)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { | 122 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { |
| 123 AppWindow* window = GetFirstAppWindow(); | 123 AppWindow* window = GetFirstAppWindow(); |
| 124 if (window) | 124 if (window) |
| 125 return window->web_contents(); | 125 return window->web_contents(); |
| 126 | 126 |
| 127 return NULL; | 127 return NULL; |
| 128 } | 128 } |
| 129 | 129 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return app_window; | 255 return app_window; |
| 256 } | 256 } |
| 257 | 257 |
| 258 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( | 258 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( |
| 259 CommandLine* command_line) { | 259 CommandLine* command_line) { |
| 260 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 260 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
| 261 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 261 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace extensions | 264 } // namespace extensions |
| OLD | NEW |