#include "components/policy/core/common/cloud/realtime_reporting_job_configuration.h"
#include <optional>
#include <set>
#include <vector>
#include "base/check_deref.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_util.h"
#include "components/policy/core/common/cloud/device_management_service.h"
#include "components/policy/core/common/cloud/dm_auth.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/policy/core/common/cloud/mock_device_management_service.h"
#include "components/version_info/version_info.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chromeos/ash/components/system/fake_statistics_provider.h"
#endif
em;
_;
StrictMock;
namespace policy {
constexpr char kAppPackage[] = …;
constexpr char kEventType[] = …;
constexpr char kAppInstallEvent[] = …;
constexpr char kEventId[] = …;
constexpr char kStatusCode[] = …;
constexpr char kDummyToken[] = …;
constexpr char kPackage[] = …;
class MockCallbackObserver { … };
class RealtimeReportingJobConfigurationTest : public testing::Test { … };
TEST_F(RealtimeReportingJobConfigurationTest, ValidatePayload) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnURLLoadComplete_Success) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnURLLoadComplete_NetError) { … }
TEST_F(RealtimeReportingJobConfigurationTest,
OnURLLoadComplete_InvalidRequest) { … }
TEST_F(RealtimeReportingJobConfigurationTest,
OnURLLoadComplete_InvalidDMToken) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnURLLoadComplete_NotSupported) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnURLLoadComplete_TempError) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnURLLoadComplete_UnknownError) { … }
TEST_F(RealtimeReportingJobConfigurationTest, ShouldRetry_Success) { … }
TEST_F(RealtimeReportingJobConfigurationTest, ShouldRetry_PartialFalure) { … }
TEST_F(RealtimeReportingJobConfigurationTest, ShouldRetry_PermanentFailure) { … }
TEST_F(RealtimeReportingJobConfigurationTest, ShouldRetry_InvalidResponse) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnBeforeRetry_HttpFailure) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnBeforeRetry_PartialBatch) { … }
TEST_F(RealtimeReportingJobConfigurationTest, OnBeforeRetry_InvalidResponse) { … }
}