#include "chrome/browser/policy/cloud/fm_registration_token_uploader.h"
#include "base/test/protobuf_matchers.h"
#include "base/test/task_environment.h"
#include "components/invalidation/invalidation_listener.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
EqualsProto;
_;
Return;
WithArg;
namespace policy {
namespace {
const char kFakeRegistrationToken[] = …;
const char kFakeDMToken[] = …;
const int kExpectedProtocolVersion = …;
const base::Time kFakeTokenEndOfLife = …;
class MockInvalidationListener : public invalidation::InvalidationListener { … };
}
class FmRegistrationTokenUploaderTest : public testing::Test { … };
TEST_F(FmRegistrationTokenUploaderTest,
OnRegistrationTokenReceivedSuccessfullyUploads) { … }
TEST_F(FmRegistrationTokenUploaderTest,
OnRegistrationTokenReceivedSuccessfullyUploadsOnConnectedCore) { … }
TEST_F(FmRegistrationTokenUploaderTest,
OnRegistrationTokenReceivedSuccessfullyUploadsOnRegisteredClient) { … }
TEST_F(FmRegistrationTokenUploaderTest,
FailedUploadToDmServerRestartsWithCorrectBackoff) { … }
}