#include "chrome/browser/enterprise/remote_commands/rotate_attestation_credential_job.h"
#include "base/functional/callback.h"
#include "base/json/json_writer.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/mock_device_trust_key_manager.h"
#include "components/enterprise/browser/device_trust/device_trust_key_manager.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
KeyRotationResult;
_;
Invoke;
namespace enterprise_commands {
namespace {
constexpr policy::RemoteCommandJob::UniqueIDType kUniqueID = …;
const char kNonceField[] = …;
const char kNonceValue[] = …;
enterprise_management::RemoteCommand CreateCommand() { … }
std::string GetPayloadWithNonce() { … }
std::string GetEmptyPayload() { … }
}
class RotateAttestationCredentialJobTest
: public testing::Test,
public testing::WithParamInterface<bool> { … };
TEST_P(RotateAttestationCredentialJobTest, SuccessRun) { … }
TEST_P(RotateAttestationCredentialJobTest, FailedRun) { … }
TEST_P(RotateAttestationCredentialJobTest, CancelledRun) { … }
TEST_P(RotateAttestationCredentialJobTest, BadPayload) { … }
INSTANTIATE_TEST_SUITE_P(…);
}