chromium/components/variations/antishuffle_unittest.cc

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

#include <stdint.h>

#include <memory>

#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "components/variations/entropy_provider.h"
#include "components/variations/proto/layer.pb.h"
#include "components/variations/proto/study.pb.h"
#include "components/variations/proto/variations_seed.pb.h"
#include "components/variations/variations_layers.h"
#include "components/variations/variations_seed_processor.h"
#include "components/variations/variations_test_utils.h"
#include "testing/gtest/include/gtest/gtest-param-test.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace variations {
namespace {

struct TestStudyConfig {};

const int kLayerId =;
const int kLayerMemberId =;

const TestStudyConfig kTestStudyConfigs[] =;

// Adds a permanently consistent study with many groups to the seed. This
// ensures that they are sensitive to any changes in the group assignment
// algorithms, which should not change between releases. The function also
// applies any settings from `config`.
void SetupStudy(VariationsSeed* seed, const TestStudyConfig& config) {}

void SetupLimitedLayer(VariationsSeed* seed) {}

void SetupSeed(VariationsSeed* seed) {}

void ProcessSeed(EntropyProviders&& entropy_providers) {}

}  // namespace

// The following tests differ only by the input entropy providers, and they
// each check that the group assignments for the permanent consistency studies
// match the values from when the test was written. New changes should not
// break consistency with these assignments.
// The HighEntropyNil tests pass an empty high entropy, which simulates the
// behavior clients that disable high entropy randomization, such as clients
// not opted in to UMA, and clients on platforms like webview where high entropy
// randomization is not supported.

TEST(VariationsAntishuffleTest, HighEntropyNil_LowEntropy0) {}

TEST(VariationsAntishuffleTest, HighEntropyId0_LowEntropy0) {}

TEST(VariationsAntishuffleTest, HighEntropyId1_LowEntropy0) {}

TEST(VariationsAntishuffleTest, HighEntropyNil_LowEntropy7999) {}

TEST(VariationsAntishuffleTest, HighEntropyId0_LowEntropy7999) {}

TEST(VariationsAntishuffleTest, HighEntropyId1_LowEntropy7999) {}

TEST(VariationsAntishuffleTest, LimitedEntropyNil) {}

TEST(VariationsAntishuffleTest, LimitedEntropyRandomizationSource) {}

}  // namespace variations