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

Unified Diff: chrome/browser/password_manager/simple_password_store_mac_unittest.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
Index: chrome/browser/password_manager/simple_password_store_mac_unittest.cc
diff --git a/chrome/browser/password_manager/simple_password_store_mac_unittest.cc b/chrome/browser/password_manager/simple_password_store_mac_unittest.cc
index a2a641f646ab60ba9e374102d1d612cb3dce5ef5..2a1987ce5a464f144321f672bf8c2acd486e068f 100644
--- a/chrome/browser/password_manager/simple_password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/simple_password_store_mac_unittest.cc
@@ -7,7 +7,7 @@
#include "base/callback.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/utf_string_conversions.h"
-#include "components/os_crypt/os_crypt.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "components/password_manager/core/browser/login_database.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -38,7 +38,7 @@ class SimplePasswordStoreMacTest : public testing::Test {
// Ensure that LoginDatabase will use the mock keychain if it needs to
// encrypt/decrypt a password.
- OSCrypt::UseMockKeychain(true);
+ OSCryptMocker::SetUpWithSingleton();
// Setup LoginDatabase.
std::unique_ptr<password_manager::LoginDatabase> login_db(
@@ -64,6 +64,7 @@ class SimplePasswordStoreMacTest : public testing::Test {
store_->ShutdownOnUIThread();
EXPECT_TRUE(store_->GetBackgroundTaskRunner());
store_ = nullptr;
+ OSCryptMocker::TearDown();
}
base::FilePath test_login_db_file_path() const {
« no previous file with comments | « chrome/browser/password_manager/password_store_proxy_mac_unittest.cc ('k') | chrome/browser/signin/local_auth_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698