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/test/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); | 220 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); |
221 base::CreateDirectory(log_dir); | 221 base::CreateDirectory(log_dir); |
222 // Disable IME extension loading to avoid many browser tests failures. | 222 // Disable IME extension loading to avoid many browser tests failures. |
223 chromeos::input_method::DisableExtensionLoading(); | 223 chromeos::input_method::DisableExtensionLoading(); |
224 if (!command_line->HasSwitch(switches::kHostWindowBounds)) { | 224 if (!command_line->HasSwitch(switches::kHostWindowBounds)) { |
225 // Adjusting window location & size so that the ash desktop window fits | 225 // Adjusting window location & size so that the ash desktop window fits |
226 // inside the Xvfb'x default resolution. | 226 // inside the Xvfb'x default resolution. |
227 command_line->AppendSwitchASCII(switches::kHostWindowBounds, | 227 command_line->AppendSwitchASCII(switches::kHostWindowBounds, |
228 "0+0-1280x800"); | 228 "0+0-1280x800"); |
229 } | 229 } |
230 #elif defined(OS_LINUX) | 230 #elif defined(OS_LINUX) && defined(USE_X11) |
231 DCHECK(!display::Screen::GetScreen()); | 231 DCHECK(!display::Screen::GetScreen()); |
232 display::Screen::SetScreenInstance( | 232 display::Screen::SetScreenInstance( |
233 views::test::TestDesktopScreenX11::GetInstance()); | 233 views::test::TestDesktopScreenX11::GetInstance()); |
234 #endif | 234 #endif |
235 | 235 |
236 // Always use a mocked password storage if OS encryption is used (which is | 236 // Always use a mocked password storage if OS encryption is used (which is |
237 // when anything sensitive gets stored, including Cookies). Without this on | 237 // when anything sensitive gets stored, including Cookies). Without this on |
238 // Mac, many tests will hang waiting for a user to approve KeyChain access. | 238 // Mac, many tests will hang waiting for a user to approve KeyChain access. |
239 OSCryptMocker::SetUpWithSingleton(); | 239 OSCryptMocker::SetUpWithSingleton(); |
240 | 240 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 // On the Mac, this eventually reaches | 607 // On the Mac, this eventually reaches |
608 // -[BrowserWindowController windowWillClose:], which will post a deferred | 608 // -[BrowserWindowController windowWillClose:], which will post a deferred |
609 // -autorelease on itself to ultimately destroy the Browser object. The line | 609 // -autorelease on itself to ultimately destroy the Browser object. The line |
610 // below is necessary to pump these pending messages to ensure all Browsers | 610 // below is necessary to pump these pending messages to ensure all Browsers |
611 // get deleted. | 611 // get deleted. |
612 content::RunAllPendingInMessageLoop(); | 612 content::RunAllPendingInMessageLoop(); |
613 delete autorelease_pool_; | 613 delete autorelease_pool_; |
614 autorelease_pool_ = NULL; | 614 autorelease_pool_ = NULL; |
615 #endif | 615 #endif |
616 } | 616 } |
OLD | NEW |