This source file includes following definitions.
- OnRetailModeSuccessQuit
- OnRetailModeSuccessQuitAndFail
- OnGuestSuccessQuit
- OnGuestSuccessQuitAndFail
- OnSuccessQuit
- OnSuccessQuitAndFail
- OnFailQuit
- OnFailQuitAndFail
- OnMigrateQuit
- OnMigrateQuitAndFail
#include "chrome/browser/chromeos/login/mock_login_status_consumer.h"
#include "base/message_loop/message_loop.h"
#include "chrome/browser/chromeos/login/user.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
MockConsumer::MockConsumer() {}
MockConsumer::~MockConsumer() {}
void MockConsumer::OnRetailModeSuccessQuit(const UserContext& user_context) {
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnRetailModeSuccessQuitAndFail(
const UserContext& user_context) {
ADD_FAILURE() << "Retail mode login should have failed!";
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnGuestSuccessQuit() {
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnGuestSuccessQuitAndFail() {
ADD_FAILURE() << "Guest login should have failed!";
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnSuccessQuit(const UserContext& user_context) {
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnSuccessQuitAndFail(const UserContext& user_context) {
ADD_FAILURE() << "Login should NOT have succeeded!";
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnFailQuit(const LoginFailure& error) {
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnFailQuitAndFail(const LoginFailure& error) {
ADD_FAILURE() << "Login should not have failed!";
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnMigrateQuit() {
base::MessageLoop::current()->Quit();
}
void MockConsumer::OnMigrateQuitAndFail() {
ADD_FAILURE() << "Should not have detected a PW change!";
base::MessageLoop::current()->Quit();
}
}