#include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/device_attester.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/mock_device_trust_key_manager.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/scoped_key_persistence_delegate_factory.h"
#include "components/enterprise/browser/controller/fake_browser_dm_token_storage.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Invoke;
namespace enterprise_connectors {
namespace {
constexpr char kFakeDeviceId[] = …;
constexpr char kDmToken[] = …;
constexpr char kInvalidDmToken[] = …;
constexpr char kFakeCustomerId[] = …;
constexpr char kFakeChallengeResponse[] = …;
}
class DeviceAttesterTest : public testing::Test { … };
TEST_F(DeviceAttesterTest, DecorateKeyInfo_Success) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_InvalidDmToken) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_EmptyDmToken) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_MissingDeviceID) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_NoBrowserCustomerId) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_FailedPublicKeyExport) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_MissingBrowserPolicyLevel) { … }
TEST_F(DeviceAttesterTest, DecorateKeyInfo_MissingBrowserCloudPolicyStore) { … }
TEST_F(DeviceAttesterTest, SignResponse_Success) { … }
TEST_F(DeviceAttesterTest, SignResponse_NoSignature) { … }
TEST_F(DeviceAttesterTest, SignResponse_MissingBrowserPolicyLevel) { … }
}