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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary build condition Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index a4f2126ba646946da2ed2680137c9b3119301f71..093b9c4f09f4e6466d4235f1e19366c4a39fd876 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -49,7 +49,7 @@
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/testing_browser_process.h"
#include "components/google/core/browser/google_util.h"
-#include "components/os_crypt/os_crypt.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -221,12 +221,10 @@ void InProcessBrowserTest::SetUp() {
}
#endif // defined(OS_CHROMEOS)
-#if defined(OS_MACOSX)
// Always use the MockKeychain if OS encription is used (which is when
Lei Zhang 2016/05/25 21:11:40 This looks out of date now.
cfroussios 2016/05/27 15:28:22 Done.
// anything sensitive gets stored, including Cookies). Without this,
// many tests will hang waiting for a user to approve KeyChain access.
- OSCrypt::UseMockKeychain(true);
-#endif
+ OSCryptMocker::SetUpWithSingleton();
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
CaptivePortalService::set_state_for_testing(
@@ -346,6 +344,7 @@ void InProcessBrowserTest::TearDown() {
com_initializer_.reset();
#endif
BrowserTestBase::TearDown();
+ OSCryptMocker::TearDown();
}
void InProcessBrowserTest::CloseBrowserSynchronously(Browser* browser) {

Powered by Google App Engine
This is Rietveld 408576698