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

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

Issue 296773002: Add a Key class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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/chromeos/login/test_login_utils.cc
diff --git a/chrome/browser/chromeos/login/test_login_utils.cc b/chrome/browser/chromeos/login/test_login_utils.cc
index 4329370653a725348d036907ea107b7b9f2ee276..b673acac3bc01ce8bffb85b3f17ad1fdfb21816d 100644
--- a/chrome/browser/chromeos/login/test_login_utils.cc
+++ b/chrome/browser/chromeos/login/test_login_utils.cc
@@ -4,27 +4,26 @@
#include "chrome/browser/chromeos/login/test_login_utils.h"
+#include "base/logging.h"
#include "chrome/browser/chromeos/login/auth/mock_authenticator.h"
#include "chrome/browser/chromeos/login/auth/user_context.h"
namespace chromeos {
-TestLoginUtils::TestLoginUtils(const std::string& expected_username,
- const std::string& expected_password)
- : expected_username_(expected_username),
- expected_password_(expected_password) {
+TestLoginUtils::TestLoginUtils(const UserContext& user_context)
+ : expected_user_context_(user_context) {
}
TestLoginUtils::~TestLoginUtils() {}
void TestLoginUtils::PrepareProfile(
- const UserContext& credentials,
+ const UserContext& user_context,
const std::string& display_email,
bool has_cookies,
bool has_active_session,
Delegate* delegate) {
- DCHECK_EQ(expected_username_, credentials.GetUserID());
- DCHECK_EQ(expected_password_, credentials.GetPassword());
+ if (user_context != expected_user_context_)
+ NOTREACHED();
// Profile hasn't been loaded.
delegate->OnProfilePrepared(NULL);
}
@@ -34,8 +33,7 @@ void TestLoginUtils::DelegateDeleted(Delegate* delegate) {
scoped_refptr<Authenticator> TestLoginUtils::CreateAuthenticator(
LoginStatusConsumer* consumer) {
- return new MockAuthenticator(
- consumer, expected_username_, expected_password_);
+ return new MockAuthenticator(consumer, expected_user_context_);
}
void TestLoginUtils::InitRlzDelayed(Profile* user_profile) {
« no previous file with comments | « chrome/browser/chromeos/login/test_login_utils.h ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698