| 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 "apps/app_window_contents.h" | 7 #include "apps/app_window_contents.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 PlatformAppBrowserTest::PlatformAppBrowserTest() { | 30 PlatformAppBrowserTest::PlatformAppBrowserTest() { |
| 31 ChromeShellWindowDelegate::DisableExternalOpenForTesting(); | 31 ChromeShellWindowDelegate::DisableExternalOpenForTesting(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void PlatformAppBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 34 void PlatformAppBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
| 35 // Skips ExtensionApiTest::SetUpCommandLine. | 35 // Skips ExtensionApiTest::SetUpCommandLine. |
| 36 ExtensionBrowserTest::SetUpCommandLine(command_line); | 36 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 37 | 37 |
| 38 // Make event pages get suspended quicker. | 38 // Make event pages get suspended quicker. |
| 39 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1"); | 39 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1000"); |
| 40 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1"); | 40 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1000"); |
| 41 } | 41 } |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 ShellWindow* PlatformAppBrowserTest::GetFirstShellWindowForBrowser( | 44 ShellWindow* PlatformAppBrowserTest::GetFirstShellWindowForBrowser( |
| 45 Browser* browser) { | 45 Browser* browser) { |
| 46 ShellWindowRegistry* app_registry = | 46 ShellWindowRegistry* app_registry = |
| 47 ShellWindowRegistry::Get(browser->profile()); | 47 ShellWindowRegistry::Get(browser->profile()); |
| 48 const ShellWindowRegistry::ShellWindowList& shell_windows = | 48 const ShellWindowRegistry::ShellWindowList& shell_windows = |
| 49 app_registry->shell_windows(); | 49 app_registry->shell_windows(); |
| 50 | 50 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bounds); | 193 bounds); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( | 196 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( |
| 197 CommandLine* command_line) { | 197 CommandLine* command_line) { |
| 198 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 198 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
| 199 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 199 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace extensions | 202 } // namespace extensions |
| OLD | NEW |