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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 ASSERT_TRUE(CreateUserDataDirectory()) | 213 ASSERT_TRUE(CreateUserDataDirectory()) |
214 << "Could not create user data directory."; | 214 << "Could not create user data directory."; |
215 | 215 |
216 // Allow subclasses the opportunity to make changes to the default user data | 216 // Allow subclasses the opportunity to make changes to the default user data |
217 // dir before running any tests. | 217 // dir before running any tests. |
218 ASSERT_TRUE(SetUpUserDataDirectory()) | 218 ASSERT_TRUE(SetUpUserDataDirectory()) |
219 << "Could not set up user data directory."; | 219 << "Could not set up user data directory."; |
220 | 220 |
221 #if defined(OS_CHROMEOS) | 221 #if defined(OS_CHROMEOS) |
222 // Make sure that the log directory exists. | 222 // Make sure that the log directory exists. |
223 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); | 223 base::FilePath log_dir = logging::GetSessionLogDir(*command_line); |
224 base::CreateDirectory(log_dir); | 224 base::CreateDirectory(log_dir); |
225 // Disable IME extension loading to avoid many browser tests failures. | 225 // Disable IME extension loading to avoid many browser tests failures. |
226 chromeos::input_method::DisableExtensionLoading(); | 226 chromeos::input_method::DisableExtensionLoading(); |
227 if (!command_line->HasSwitch(switches::kHostWindowBounds)) { | 227 if (!command_line->HasSwitch(switches::kHostWindowBounds)) { |
228 // Adjusting window location & size so that the ash desktop window fits | 228 // Adjusting window location & size so that the ash desktop window fits |
229 // inside the Xvfb'x default resolution. | 229 // inside the Xvfb'x default resolution. |
230 command_line->AppendSwitchASCII(switches::kHostWindowBounds, | 230 command_line->AppendSwitchASCII(switches::kHostWindowBounds, |
231 "0+0-1280x800"); | 231 "0+0-1280x800"); |
232 } | 232 } |
233 #elif defined(OS_LINUX) && defined(USE_X11) | 233 #elif defined(OS_LINUX) && defined(USE_X11) |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 // On the Mac, this eventually reaches | 623 // On the Mac, this eventually reaches |
624 // -[BrowserWindowController windowWillClose:], which will post a deferred | 624 // -[BrowserWindowController windowWillClose:], which will post a deferred |
625 // -autorelease on itself to ultimately destroy the Browser object. The line | 625 // -autorelease on itself to ultimately destroy the Browser object. The line |
626 // below is necessary to pump these pending messages to ensure all Browsers | 626 // below is necessary to pump these pending messages to ensure all Browsers |
627 // get deleted. | 627 // get deleted. |
628 content::RunAllPendingInMessageLoop(); | 628 content::RunAllPendingInMessageLoop(); |
629 delete autorelease_pool_; | 629 delete autorelease_pool_; |
630 autorelease_pool_ = NULL; | 630 autorelease_pool_ = NULL; |
631 #endif | 631 #endif |
632 } | 632 } |
OLD | NEW |