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

Unified Diff: chrome/browser/chromeos/login/parallel_authenticator_unittest.cc

Issue 8761016: Shaving parallel authenticator yak to remove unnecessary dependency on this class from OAuth spec... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/chromeos/login/parallel_authenticator_unittest.cc
===================================================================
--- chrome/browser/chromeos/login/parallel_authenticator_unittest.cc (revision 112673)
+++ chrome/browser/chromeos/login/parallel_authenticator_unittest.cc (working copy)
@@ -247,22 +247,6 @@
scoped_ptr<TestAttemptState> state_;
};
-TEST_F(ParallelAuthenticatorTest, SaltToAscii) {
- unsigned char fake_salt[8] = { 0 };
- fake_salt[0] = 10;
- fake_salt[1] = 1;
- fake_salt[7] = 10 << 4;
- std::vector<unsigned char> salt_v(fake_salt, fake_salt + sizeof(fake_salt));
-
- ON_CALL(*mock_library_, GetSystemSalt())
- .WillByDefault(Return(salt_v));
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_EQ("0a010000000000a0", auth_->SaltAsAscii());
-}
-
TEST_F(ParallelAuthenticatorTest, ReadLocalaccount) {
FilePath tmp_file_path = FakeLocalaccountFile(username_);
@@ -464,8 +448,8 @@
EXPECT_CALL(*mock_library_, AsyncMount(username_, hash_ascii_, false, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
state_->PresetOnlineLoginStatus(result_, LoginFailure::None());
@@ -485,8 +469,8 @@
EXPECT_CALL(*mock_library_, AsyncMigrateKey(username_, _, hash_ascii_, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
SetAttemptState(auth_, state_.release());
@@ -616,8 +600,8 @@
_))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
// Set up state as though a cryptohome mount attempt has occurred and
@@ -653,8 +637,8 @@
TEST_F(ParallelAuthenticatorTest, DriveOfflineLoginGetCaptchad) {
ExpectLoginSuccess(username_, password_, result_, true);
FailOnLoginFailure();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
// Set up state as though a cryptohome mount attempt has occurred and
@@ -766,8 +750,8 @@
EXPECT_CALL(*mock_library_, AsyncCheckKey(username_, _, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
auth_->AuthenticateToUnlock(username_, "");
@@ -784,8 +768,8 @@
EXPECT_CALL(*mock_library_, AsyncCheckKey(username_, _, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
+ EXPECT_CALL(*mock_library_, HashPassword(_))
+ .WillOnce(Return(std::string()))
.RetiresOnSaturation();
// Deal with getting the localaccount file
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698