Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: chrome/test/base/in_process_browser_test.cc

Issue 2314853003: Move ash::DisplayManager switches to ui::display (Closed)
Patch Set: rebased again Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "ash/common/ash_switches.h"
8 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
9 #include "base/bind.h" 8 #include "base/bind.h"
10 #include "base/command_line.h" 9 #include "base/command_line.h"
11 #include "base/feature_list.h" 10 #include "base/feature_list.h"
12 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
14 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
15 #include "base/location.h" 14 #include "base/location.h"
16 #include "base/macros.h" 15 #include "base/macros.h"
17 #include "base/path_service.h" 16 #include "base/path_service.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "components/google/core/browser/google_util.h" 50 #include "components/google/core/browser/google_util.h"
52 #include "components/os_crypt/os_crypt_mocker.h" 51 #include "components/os_crypt/os_crypt_mocker.h"
53 #include "content/public/browser/devtools_agent_host.h" 52 #include "content/public/browser/devtools_agent_host.h"
54 #include "content/public/browser/notification_service.h" 53 #include "content/public/browser/notification_service.h"
55 #include "content/public/browser/notification_types.h" 54 #include "content/public/browser/notification_types.h"
56 #include "content/public/common/content_switches.h" 55 #include "content/public/common/content_switches.h"
57 #include "content/public/test/browser_test_utils.h" 56 #include "content/public/test/browser_test_utils.h"
58 #include "content/public/test/test_launcher.h" 57 #include "content/public/test/test_launcher.h"
59 #include "content/public/test/test_navigation_observer.h" 58 #include "content/public/test/test_navigation_observer.h"
60 #include "net/test/embedded_test_server/embedded_test_server.h" 59 #include "net/test/embedded_test_server/embedded_test_server.h"
60 #include "ui/display/display_switches.h"
61 61
62 #if defined(OS_MACOSX) 62 #if defined(OS_MACOSX)
63 #include "base/mac/scoped_nsautorelease_pool.h" 63 #include "base/mac/scoped_nsautorelease_pool.h"
64 #include "chrome/test/base/scoped_bundle_swizzler_mac.h" 64 #include "chrome/test/base/scoped_bundle_swizzler_mac.h"
65 #endif 65 #endif
66 66
67 #if defined(OS_WIN) 67 #if defined(OS_WIN)
68 #include "base/win/scoped_com_initializer.h" 68 #include "base/win/scoped_com_initializer.h"
69 #include "base/win/windows_version.h" 69 #include "base/win/windows_version.h"
70 #include "ui/base/win/atl_module.h" 70 #include "ui/base/win/atl_module.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // dir before running any tests. 209 // dir before running any tests.
210 ASSERT_TRUE(SetUpUserDataDirectory()) 210 ASSERT_TRUE(SetUpUserDataDirectory())
211 << "Could not set up user data directory."; 211 << "Could not set up user data directory.";
212 212
213 #if defined(OS_CHROMEOS) 213 #if defined(OS_CHROMEOS)
214 // Make sure that the log directory exists. 214 // Make sure that the log directory exists.
215 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); 215 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName();
216 base::CreateDirectory(log_dir); 216 base::CreateDirectory(log_dir);
217 // Disable IME extension loading to avoid many browser tests failures. 217 // Disable IME extension loading to avoid many browser tests failures.
218 chromeos::input_method::DisableExtensionLoading(); 218 chromeos::input_method::DisableExtensionLoading();
219 if (!command_line->HasSwitch(ash::switches::kAshHostWindowBounds)) { 219 if (!command_line->HasSwitch(switches::kHostWindowBounds)) {
220 // Adjusting window location & size so that the ash desktop window fits 220 // Adjusting window location & size so that the ash desktop window fits
221 // inside the Xvfb'x defualt resolution. 221 // inside the Xvfb'x defualt resolution.
222 command_line->AppendSwitchASCII(ash::switches::kAshHostWindowBounds, 222 command_line->AppendSwitchASCII(switches::kHostWindowBounds,
223 "0+0-1280x800"); 223 "0+0-1280x800");
224 } 224 }
225 #endif // defined(OS_CHROMEOS) 225 #endif // defined(OS_CHROMEOS)
226 226
227 // Always use a mocked password storage if OS encryption is used (which is 227 // Always use a mocked password storage if OS encryption is used (which is
228 // when anything sensitive gets stored, including Cookies). Without this on 228 // when anything sensitive gets stored, including Cookies). Without this on
229 // Mac, many tests will hang waiting for a user to approve KeyChain access. 229 // Mac, many tests will hang waiting for a user to approve KeyChain access.
230 OSCryptMocker::SetUpWithSingleton(); 230 OSCryptMocker::SetUpWithSingleton();
231 231
232 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 232 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // On the Mac, this eventually reaches 598 // On the Mac, this eventually reaches
599 // -[BrowserWindowController windowWillClose:], which will post a deferred 599 // -[BrowserWindowController windowWillClose:], which will post a deferred
600 // -autorelease on itself to ultimately destroy the Browser object. The line 600 // -autorelease on itself to ultimately destroy the Browser object. The line
601 // below is necessary to pump these pending messages to ensure all Browsers 601 // below is necessary to pump these pending messages to ensure all Browsers
602 // get deleted. 602 // get deleted.
603 content::RunAllPendingInMessageLoop(); 603 content::RunAllPendingInMessageLoop();
604 delete autorelease_pool_; 604 delete autorelease_pool_;
605 autorelease_pool_ = NULL; 605 autorelease_pool_ = NULL;
606 #endif 606 #endif
607 } 607 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/test/base/view_event_test_platform_part_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698