chromium/components/variations/study_filtering_unittest.cc

// Copyright 2014 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/variations/study_filtering.h"

#include <stddef.h>
#include <stdint.h>
#include <string.h>

#include <algorithm>
#include <array>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "client_filterable_state.h"
#include "components/variations/client_filterable_state.h"
#include "components/variations/processed_study.h"
#include "components/variations/variations_layers.h"
#include "components/variations/variations_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace variations {

namespace {

// Converts |time| to Study proto format.
int64_t TimeToProtoTime(const base::Time& time) {}

// Adds an experiment to |study| with the specified |name| and |probability|.
Study::Experiment* AddExperiment(const std::string& name,
                                 int probability,
                                 Study* study) {}

std::vector<std::string> SplitFilterString(const std::string& input) {}

ClientFilterableState ClientFilterableStateForGoogleGroups(
    const base::flat_set<uint64_t> google_groups) {}

}  // namespace

TEST(VariationsStudyFilteringTest, CheckStudyChannel) {}

TEST(VariationsStudyFilteringTest, CheckStudyFormFactor) {}

TEST(VariationsStudyFilteringTest, CheckStudyLocale) {}

TEST(VariationsStudyFilteringTest, CheckStudyPlatform) {}

TEST(VariationsStudyFilteringTest, CheckStudyLowEndDevice) {}

TEST(VariationsStudyFilteringTest, CheckStudyEnterprise) {}

TEST(VariationsStudyFilteringTest, CheckStudyPolicyRestriction) {}

TEST(VariationsStudyFilteringTest, CheckStudyStartDate) {}

TEST(VariationsStudyFilteringTest, CheckStudyEndDate) {}

TEST(VariationsStudyFilteringTest, CheckStudyOSVersion) {}

TEST(VariationsStudyFilteringTest, CheckStudyMalformedOSVersion) {}

TEST(VariationsStudyFilteringTest, CheckStudyVersion) {}

TEST(VariationsStudyFilteringTest, CheckStudyHardwareClass) {}

TEST(VariationsStudyFilteringTest, CheckStudyCountry) {}

TEST(VariationsStudyFilteringTest, CheckStudyGoogleGroupFilterNotSet) {}

TEST(VariationsStudyFilteringTest, CheckStudyGoogleGroupFilterSet) {}

TEST(VariationsStudyFilteringTest, CheckStudyExcludeGoogleGroupFilterSet) {}

TEST(VariationsStudyFilteringTest, CheckStudyBothGoogleGroupFiltersSet) {}

TEST(VariationsStudyFilteringTest, FilterAndValidateStudies) {}

TEST(VariationsStudyFilteringTest, FilterAndValidateStudiesWithBadFilters) {}

TEST(VariationsStudyFilteringTest, FilterAndValidateStudiesWithBlankStudyName) {}

TEST(VariationsStudyFilteringTest, FilterAndValidateStudiesWithCountry) {}

TEST(VariationsStudyFilteringTest, GetClientCountryForStudy_Session) {}

TEST(VariationsStudyFilteringTest, GetClientCountryForStudy_Permanent) {}

TEST(VariationsStudyFilteringTest, ValidateStudy) {}

}  // namespace variations