chromium/components/metrics/field_trials_provider_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/metrics/field_trials_provider.h"

#include <string_view>

#include "base/metrics/field_trial.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/platform_thread.h"
#include "components/variations/active_field_trials.h"
#include "components/variations/synthetic_trial_registry.h"
#include "components/variations/synthetic_trials.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/system_profile.pb.h"

ActiveGroup;

namespace variations {

namespace {

constexpr const char* kSuffix =;

const ActiveGroup kFieldTrials[] =;
const ActiveGroup kSyntheticFieldTrials[] =;

ActiveGroupId ToActiveGroupId(ActiveGroup active_group,
                              std::string suffix = "");

const ActiveGroupId kFieldTrialIds[] =;
const ActiveGroupId kAllTrialIds[] =;
const ActiveGroupId kAllTrialIdsWithSuffixes[] =;

// Check that the field trials in |system_profile| correspond to |expected|.
void CheckFieldTrialsInSystemProfile(
    const metrics::SystemProfileProto& system_profile,
    const ActiveGroupId* expected) {}

ActiveGroupId ToActiveGroupId(ActiveGroup active_group, std::string suffix) {}

}  // namespace

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

TEST_F(FieldTrialsProviderTest, ProvideSyntheticTrials) {}

TEST_F(FieldTrialsProviderTest, NoSyntheticTrials) {}

TEST_F(FieldTrialsProviderTest, ProvideCurrentSessionData) {}

TEST_F(FieldTrialsProviderTest, GetAndWriteFieldTrialsWithSuffixes) {}

}  // namespace variations