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

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

Issue 9348022: [cros] Use mocked URLFetcher and other mocks in ExistingUserController tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move Created 8 years, 9 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/chromeos/login/mock_authenticator.cc
diff --git a/chrome/browser/chromeos/login/mock_authenticator.cc b/chrome/browser/chromeos/login/mock_authenticator.cc
index 048ff81869954d4a6ca99d7a8c6d6dc4de69f0b6..e028ce0b507a1d425c36d29727cfe9998f8d56f5 100644
--- a/chrome/browser/chromeos/login/mock_authenticator.cc
+++ b/chrome/browser/chromeos/login/mock_authenticator.cc
@@ -19,6 +19,7 @@ void MockAuthenticator::AuthenticateToLogin(Profile* profile,
if (expected_username_ == username && expected_password_ == password) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&MockAuthenticator::OnLoginSuccess, this, false));
+ return;
}
GoogleServiceAuthError error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
@@ -68,17 +69,17 @@ void MockAuthenticator::OnLoginFailure(const LoginFailure& failure) {
}
////////////////////////////////////////////////////////////////////////////////
-// MockLoginUtils
+// TestLoginUtils
-MockLoginUtils::MockLoginUtils(const std::string& expected_username,
+TestLoginUtils::TestLoginUtils(const std::string& expected_username,
const std::string& expected_password)
: expected_username_(expected_username),
expected_password_(expected_password) {
}
-MockLoginUtils::~MockLoginUtils() {}
+TestLoginUtils::~TestLoginUtils() {}
-void MockLoginUtils::PrepareProfile(
+void TestLoginUtils::PrepareProfile(
const std::string& username,
const std::string& display_email,
const std::string& password,
@@ -92,31 +93,31 @@ void MockLoginUtils::PrepareProfile(
delegate->OnProfilePrepared(NULL);
}
-void MockLoginUtils::DelegateDeleted(Delegate* delegate) {
+void TestLoginUtils::DelegateDeleted(Delegate* delegate) {
}
-scoped_refptr<Authenticator> MockLoginUtils::CreateAuthenticator(
+scoped_refptr<Authenticator> TestLoginUtils::CreateAuthenticator(
LoginStatusConsumer* consumer) {
return new MockAuthenticator(
consumer, expected_username_, expected_password_);
}
-std::string MockLoginUtils::GetOffTheRecordCommandLine(
+std::string TestLoginUtils::GetOffTheRecordCommandLine(
const GURL& start_url,
const CommandLine& base_command_line,
CommandLine* command_line) {
return std::string();
}
-void MockLoginUtils::TransferDefaultCookies(Profile* default_profile,
+void TestLoginUtils::TransferDefaultCookies(Profile* default_profile,
Profile* new_profile) {
}
-void MockLoginUtils::TransferDefaultAuthCache(Profile* default_profile,
+void TestLoginUtils::TransferDefaultAuthCache(Profile* default_profile,
Profile* new_profile) {
}
-void MockLoginUtils::StopBackgroundFetchers() {
+void TestLoginUtils::StopBackgroundFetchers() {
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/mock_authenticator.h ('k') | chrome/browser/chromeos/login/mock_login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698