Index: chrome/browser/password_manager/encryptor_password_mac_unittest.cc |
diff --git a/chrome/browser/password_manager/encryptor_password_mac_unittest.cc b/chrome/browser/password_manager/encryptor_password_mac_unittest.cc |
index 284b881b7c31c2489d3bd21f088839063e27002a..f7b211af0407e6b612a1621c4c3f44429ea4c0fc 100644 |
--- a/chrome/browser/password_manager/encryptor_password_mac_unittest.cc |
+++ b/chrome/browser/password_manager/encryptor_password_mac_unittest.cc |
@@ -3,17 +3,17 @@ |
// found in the LICENSE file. |
#include "chrome/browser/password_manager/encryptor_password_mac.h" |
-#include "crypto/mock_keychain_mac.h" |
+#include "crypto/mock_apple_keychain.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace { |
-using crypto::MockKeychain; |
+using crypto::MockAppleKeychain; |
// Test that if we have an existing password in the Keychain and we are |
// authorized by the user to read it then we get it back correctly. |
TEST(EncryptorPasswordTest, FindPasswordSuccess) { |
- MockKeychain keychain; |
+ MockAppleKeychain keychain; |
keychain.set_find_generic_result(noErr); |
EncryptorPassword password(keychain); |
EXPECT_FALSE(password.GetEncryptorPassword().empty()); |
@@ -24,7 +24,7 @@ TEST(EncryptorPasswordTest, FindPasswordSuccess) { |
// Test that if we do not have an existing password in the Keychain then it |
// gets added successfully and returned. |
TEST(EncryptorPasswordTest, FindPasswordNotFound) { |
- MockKeychain keychain; |
+ MockAppleKeychain keychain; |
keychain.set_find_generic_result(errSecItemNotFound); |
EncryptorPassword password(keychain); |
EXPECT_EQ(24U, password.GetEncryptorPassword().length()); |
@@ -35,7 +35,7 @@ TEST(EncryptorPasswordTest, FindPasswordNotFound) { |
// Test that if get denied access by the user then we return an empty password. |
// And we should not try to add one. |
TEST(EncryptorPasswordTest, FindPasswordNotAuthorized) { |
- MockKeychain keychain; |
+ MockAppleKeychain keychain; |
keychain.set_find_generic_result(errSecAuthFailed); |
EncryptorPassword password(keychain); |
EXPECT_TRUE(password.GetEncryptorPassword().empty()); |
@@ -46,7 +46,7 @@ TEST(EncryptorPasswordTest, FindPasswordNotAuthorized) { |
// Test that if some random other error happens then we return an empty |
// password, and we should not try to add one. |
TEST(EncryptorPasswordTest, FindPasswordOtherError) { |
- MockKeychain keychain; |
+ MockAppleKeychain keychain; |
keychain.set_find_generic_result(errSecNotAvailable); |
EncryptorPassword password(keychain); |
EXPECT_TRUE(password.GetEncryptorPassword().empty()); |
@@ -56,7 +56,7 @@ TEST(EncryptorPasswordTest, FindPasswordOtherError) { |
// Test that subsequent additions to the keychain give different passwords. |
TEST(EncryptorPasswordTest, PasswordsDiffer) { |
- MockKeychain keychain1; |
+ MockAppleKeychain keychain1; |
keychain1.set_find_generic_result(errSecItemNotFound); |
EncryptorPassword encryptor_password1(keychain1); |
std::string password1 = encryptor_password1.GetEncryptorPassword(); |
@@ -64,7 +64,7 @@ TEST(EncryptorPasswordTest, PasswordsDiffer) { |
EXPECT_TRUE(keychain1.called_add_generic()); |
EXPECT_EQ(0, keychain1.password_data_count()); |
- MockKeychain keychain2; |
+ MockAppleKeychain keychain2; |
keychain2.set_find_generic_result(errSecItemNotFound); |
EncryptorPassword encryptor_password2(keychain2); |
std::string password2 = encryptor_password2.GetEncryptorPassword(); |