chromium/chrome/browser/policy/messaging_layer/upload/configuration_file_controller_unittest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/policy/messaging_layer/upload/configuration_file_controller.h"
#include <cstdint>

#include "base/task/thread_pool.h"
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/protobuf_matchers.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "chrome/browser/policy/messaging_layer/upload/record_upload_request_builder.h"
#include "components/reporting/encryption/primitives.h"
#include "components/reporting/proto/synced/record_constants.pb.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/test_support_callbacks.h"
#include "content/public/test/browser_task_environment.h"

EqualsProto;
HasSubstr;

namespace reporting {

static constexpr int kBaseChromeVersion =;
static constexpr int kConfigFileVersion =;
static constexpr char kSignature[] =;
static constexpr uint8_t kBadSignature[] =;
static_assert;

class ConfigurationFileControllerTest : public ::testing::Test {};

TEST_F(ConfigurationFileControllerTest, EmptyConfigFileDoesNotCallMissive) {}

TEST_F(ConfigurationFileControllerTest, VersionMinusOneDoesNotCallMissive) {}

TEST_F(ConfigurationFileControllerTest,
       EmptyBlockedEventConfigsUpdatesVersionButDoesNotCallMissive) {}

TEST_F(ConfigurationFileControllerTest,
       ConfigFileExperimentDisabledDoesNothing) {}

TEST_F(ConfigurationFileControllerTest,
       TestFlagCallsMissiveWithSingleDestination) {}

TEST_F(ConfigurationFileControllerTest,
       TestFlagCallsMissiveWithMultipleDestinations) {}

TEST_F(ConfigurationFileControllerTest,
       TestFlagWithMultipleDestinationsNotInRange) {}

TEST_F(ConfigurationFileControllerTest,
       TestFlagWithMultipleDestinationsOneInRange) {}

// TODO(b/302544753): Add test to verify that the `ConfigurationFileController`
// calls missive when provided with a valid prod signature. Adding this after
// server MVP implementation.

TEST_F(ConfigurationFileControllerTest, BadProdSignatureSendsUMA) {}

TEST_F(ConfigurationFileControllerTest, NoConfigFileSignatureSendsUMA) {}

TEST_F(ConfigurationFileControllerTest, BadConfigFileSignatureSizeSendsUMA) {}

TEST_F(ConfigurationFileControllerTest,
       PreviousDestinationListEqualDoesntCallMissive) {}

TEST_F(ConfigurationFileControllerTest,
       PreviousDestinationListDifferentCallsMissive) {}

TEST_F(ConfigurationFileControllerTest,
       PreviousDestinationListPopulatedNewDestinationListEmptyCallsMissive) {}

}  // namespace reporting