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/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 #endif // defined(OS_CHROMEOS) | 171 #endif // defined(OS_CHROMEOS) |
172 | 172 |
173 #if defined(OS_MACOSX) | 173 #if defined(OS_MACOSX) |
174 // Always use the MockKeychain if OS encription is used (which is when | 174 // Always use the MockKeychain if OS encription is used (which is when |
175 // anything sensitive gets stored, including Cookies). Without this, | 175 // anything sensitive gets stored, including Cookies). Without this, |
176 // many tests will hang waiting for a user to approve KeyChain access. | 176 // many tests will hang waiting for a user to approve KeyChain access. |
177 OSCrypt::UseMockKeychain(true); | 177 OSCrypt::UseMockKeychain(true); |
178 #endif | 178 #endif |
179 | 179 |
180 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 180 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
181 captive_portal::CaptivePortalService::set_state_for_testing( | 181 CaptivePortalService::set_state_for_testing( |
182 captive_portal::CaptivePortalService::DISABLED_FOR_TESTING); | 182 CaptivePortalService::DISABLED_FOR_TESTING); |
183 #endif | 183 #endif |
184 | 184 |
185 chrome_browser_net::NetErrorTabHelper::set_state_for_testing( | 185 chrome_browser_net::NetErrorTabHelper::set_state_for_testing( |
186 chrome_browser_net::NetErrorTabHelper::TESTING_FORCE_DISABLED); | 186 chrome_browser_net::NetErrorTabHelper::TESTING_FORCE_DISABLED); |
187 | 187 |
188 google_util::SetMockLinkDoctorBaseURLForTesting(); | 188 google_util::SetMockLinkDoctorBaseURLForTesting(); |
189 | 189 |
190 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
191 base::win::Version version = base::win::GetVersion(); | 191 base::win::Version version = base::win::GetVersion(); |
192 // Although Ash officially is only supported for users on Win7+, we still run | 192 // Although Ash officially is only supported for users on Win7+, we still run |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // On the Mac, this eventually reaches | 464 // On the Mac, this eventually reaches |
465 // -[BrowserWindowController windowWillClose:], which will post a deferred | 465 // -[BrowserWindowController windowWillClose:], which will post a deferred |
466 // -autorelease on itself to ultimately destroy the Browser object. The line | 466 // -autorelease on itself to ultimately destroy the Browser object. The line |
467 // below is necessary to pump these pending messages to ensure all Browsers | 467 // below is necessary to pump these pending messages to ensure all Browsers |
468 // get deleted. | 468 // get deleted. |
469 content::RunAllPendingInMessageLoop(); | 469 content::RunAllPendingInMessageLoop(); |
470 delete autorelease_pool_; | 470 delete autorelease_pool_; |
471 autorelease_pool_ = NULL; | 471 autorelease_pool_ = NULL; |
472 #endif | 472 #endif |
473 } | 473 } |
OLD | NEW |