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 1360233005: Set the browser window bounds to fit to the Xvfb's size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't set if already set Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ash_switches.h"
7 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/command_line.h" 11 #include "base/command_line.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
13 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
14 #include "base/location.h" 15 #include "base/location.h"
15 #include "base/path_service.h" 16 #include "base/path_service.h"
16 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // dir before running any tests. 227 // dir before running any tests.
227 ASSERT_TRUE(SetUpUserDataDirectory()) 228 ASSERT_TRUE(SetUpUserDataDirectory())
228 << "Could not set up user data directory."; 229 << "Could not set up user data directory.";
229 230
230 #if defined(OS_CHROMEOS) 231 #if defined(OS_CHROMEOS)
231 // Make sure that the log directory exists. 232 // Make sure that the log directory exists.
232 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); 233 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName();
233 base::CreateDirectory(log_dir); 234 base::CreateDirectory(log_dir);
234 // Disable IME extension loading to avoid many browser tests failures. 235 // Disable IME extension loading to avoid many browser tests failures.
235 chromeos::input_method::DisableExtensionLoading(); 236 chromeos::input_method::DisableExtensionLoading();
237 if (!command_line->HasSwitch(ash::switches::kAshHostWindowBounds)) {
238 // Adjusting window location & size so that the ash desktop window fits
239 // inside the Xvfb'x defualt resolution.
240 command_line->AppendSwitchASCII(ash::switches::kAshHostWindowBounds,
241 "0+0-1280x800");
242 }
236 #endif // defined(OS_CHROMEOS) 243 #endif // defined(OS_CHROMEOS)
237 244
238 #if defined(OS_MACOSX) 245 #if defined(OS_MACOSX)
239 // Always use the MockKeychain if OS encription is used (which is when 246 // Always use the MockKeychain if OS encription is used (which is when
240 // anything sensitive gets stored, including Cookies). Without this, 247 // anything sensitive gets stored, including Cookies). Without this,
241 // many tests will hang waiting for a user to approve KeyChain access. 248 // many tests will hang waiting for a user to approve KeyChain access.
242 OSCrypt::UseMockKeychain(true); 249 OSCrypt::UseMockKeychain(true);
243 #endif 250 #endif
244 251
245 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 252 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 // On the Mac, this eventually reaches 657 // On the Mac, this eventually reaches
651 // -[BrowserWindowController windowWillClose:], which will post a deferred 658 // -[BrowserWindowController windowWillClose:], which will post a deferred
652 // -autorelease on itself to ultimately destroy the Browser object. The line 659 // -autorelease on itself to ultimately destroy the Browser object. The line
653 // below is necessary to pump these pending messages to ensure all Browsers 660 // below is necessary to pump these pending messages to ensure all Browsers
654 // get deleted. 661 // get deleted.
655 content::RunAllPendingInMessageLoop(); 662 content::RunAllPendingInMessageLoop();
656 delete autorelease_pool_; 663 delete autorelease_pool_;
657 autorelease_pool_ = NULL; 664 autorelease_pool_ = NULL;
658 #endif 665 #endif
659 } 666 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698