#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/protocol_mock_objects.h"
#include "remoting/protocol/validating_authenticator.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
namespace remoting::protocol {
namespace …
class ValidatingAuthenticatorTest : public testing::Test { … };
ValidatingAuthenticatorTest::ValidatingAuthenticatorTest() = default;
ValidatingAuthenticatorTest::~ValidatingAuthenticatorTest() = default;
void ValidatingAuthenticatorTest::ValidateCallback(
const std::string& remote_jid,
ValidatingAuthenticator::ResultCallback callback) { … }
void ValidatingAuthenticatorTest::SetUp() { … }
void ValidatingAuthenticatorTest::SendMessageAndWaitForCallback() { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_SingleMessage) { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_TwoMessages) { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_SendBeforeAccept) { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_ErrorInvalidCredentials) { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_ErrorRejectedByUser) { … }
TEST_F(ValidatingAuthenticatorTest,
ValidConnectionMessageWaiting_ErrorRejectedByUser) { … }
TEST_F(ValidatingAuthenticatorTest, ValidConnection_ErrorTooManyConnections) { … }
TEST_F(ValidatingAuthenticatorTest, InvalidConnection_InvalidCredentials) { … }
TEST_F(ValidatingAuthenticatorTest, InvalidConnection_InvalidAccount) { … }
TEST_F(ValidatingAuthenticatorTest, InvalidConnection_ProtocolError) { … }
TEST_F(ValidatingAuthenticatorTest, StateChangeAfterAccepted_Propagated) { … }
}