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

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: Updated doc 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48b71dd2b46205f95d462440462f7ecd2ad3116c..a8c5a4af90f31185df7d1cb5bcbe3aa8fbfcabbb 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"
@@ -220,12 +220,10 @@ void InProcessBrowserTest::SetUp() {
}
#endif // defined(OS_CHROMEOS)
-#if defined(OS_MACOSX)
- // Always use the MockKeychain if OS encription is used (which is when
- // anything sensitive gets stored, including Cookies). Without this,
- // many tests will hang waiting for a user to approve KeyChain access.
- OSCrypt::UseMockKeychain(true);
-#endif
+ // Always use a mocked password storage if OS encryption is used (which is
+ // when anything sensitive gets stored, including Cookies). Without this on
+ // Mac, many tests will hang waiting for a user to approve KeyChain access.
+ OSCryptMocker::SetUpWithSingleton();
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
CaptivePortalService::set_state_for_testing(
@@ -345,6 +343,7 @@ void InProcessBrowserTest::TearDown() {
com_initializer_.reset();
#endif
BrowserTestBase::TearDown();
+ OSCryptMocker::TearDown();
}
void InProcessBrowserTest::CloseBrowserSynchronously(Browser* browser) {
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698