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

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, 1 month 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 112243)
+++ 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,9 +448,6 @@
EXPECT_CALL(*mock_library_, AsyncMount(username_, hash_ascii_, false, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
state_->PresetOnlineLoginStatus(result_, LoginFailure::None());
SetAttemptState(auth_, state_.release());
@@ -485,9 +466,6 @@
EXPECT_CALL(*mock_library_, AsyncMigrateKey(username_, _, hash_ascii_, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
SetAttemptState(auth_, state_.release());
@@ -616,9 +594,6 @@
_))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
// Set up state as though a cryptohome mount attempt has occurred and
// succeeded; also, an online request that never made it.
@@ -653,9 +628,6 @@
TEST_F(ParallelAuthenticatorTest, DriveOfflineLoginGetCaptchad) {
ExpectLoginSuccess(username_, password_, result_, true);
FailOnLoginFailure();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
// Set up state as though a cryptohome mount attempt has occurred and
// succeeded; also, an online request that never made it.
@@ -766,9 +738,6 @@
EXPECT_CALL(*mock_library_, AsyncCheckKey(username_, _, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
auth_->AuthenticateToUnlock(username_, "");
message_loop_.Run();
@@ -784,9 +753,6 @@
EXPECT_CALL(*mock_library_, AsyncCheckKey(username_, _, _))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*mock_library_, GetSystemSalt())
- .WillOnce(Return(CryptohomeBlob(2, 0)))
- .RetiresOnSaturation();
// Deal with getting the localaccount file
FilePath tmp_file_path = FakeLocalaccountFile(username_);

Powered by Google App Engine
This is Rietveld 408576698