OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/platform_app_browsertest_util.h" | 5 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/stringprintf.h" | 8 #include "base/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" |
11 #include "chrome/browser/extensions/shell_window_registry.h" | 11 #include "chrome/browser/extensions/shell_window_registry.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/extensions/application_launch.h" | 13 #include "chrome/browser/ui/extensions/application_launch.h" |
14 #include "chrome/browser/ui/extensions/native_app_window.h" | 14 #include "chrome/browser/ui/extensions/native_app_window.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
17 #include "content/public/test/test_utils.h" | 17 #include "content/public/test/test_utils.h" |
18 | 18 |
19 using content::WebContents; | 19 using content::WebContents; |
20 | 20 |
21 namespace utils = extension_function_test_utils; | 21 namespace utils = extension_function_test_utils; |
22 | 22 |
23 namespace extensions { | 23 namespace extensions { |
24 | 24 |
| 25 PlatformAppBrowserTest::PlatformAppBrowserTest() { |
| 26 ShellWindow::DisableExternalOpenForTesting(); |
| 27 } |
| 28 |
25 void PlatformAppBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 29 void PlatformAppBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
26 // Skips ExtensionApiTest::SetUpCommandLine. | 30 // Skips ExtensionApiTest::SetUpCommandLine. |
27 ExtensionBrowserTest::SetUpCommandLine(command_line); | 31 ExtensionBrowserTest::SetUpCommandLine(command_line); |
28 | 32 |
29 // Make event pages get suspended quicker. | 33 // Make event pages get suspended quicker. |
30 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1"); | 34 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1"); |
31 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1"); | 35 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1"); |
32 } | 36 } |
33 | 37 |
34 const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp( | 38 const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp( |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 destroyed_observer.Wait(); | 163 destroyed_observer.Wait(); |
160 } | 164 } |
161 | 165 |
162 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( | 166 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( |
163 CommandLine* command_line) { | 167 CommandLine* command_line) { |
164 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 168 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
165 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 169 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
166 } | 170 } |
167 | 171 |
168 } // namespace extensions | 172 } // namespace extensions |
OLD | NEW |