#include "chrome/browser/tpcd/experiment/experiment_manager_impl.h"
#include <optional>
#include <string>
#include <vector>
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_runner.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tpcd/experiment/tpcd_experiment_features.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/metrics_service.h"
#include "components/prefs/pref_service.h"
#include "components/privacy_sandbox/privacy_sandbox_prefs.h"
#include "components/privacy_sandbox/tpcd_pref_names.h"
#include "components/privacy_sandbox/tpcd_utils.h"
#include "components/variations/active_field_trials.h"
#include "components/variations/hashing.h"
#include "components/variations/synthetic_trial_registry.h"
#include "components/variations/synthetic_trials.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace tpcd::experiment {
HashName;
struct SyntheticTrialTestCase { … };
constexpr char kEligibleGroupName[] = …;
constexpr char kOverrideGroupName[] = …;
class ExperimentManagerImplBrowserTest : public InProcessBrowserTest { … };
#if !BUILDFLAG(IS_ANDROID)
class ExperimentManagerImplSyntheticTrialTest
: public ExperimentManagerImplBrowserTest,
public testing::WithParamInterface<SyntheticTrialTestCase> { … };
IN_PROC_BROWSER_TEST_P(ExperimentManagerImplSyntheticTrialTest,
PRE_RegistersSyntheticTrial) { … }
IN_PROC_BROWSER_TEST_P(ExperimentManagerImplSyntheticTrialTest,
RegistersSyntheticTrial) { … }
const SyntheticTrialTestCase kTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
class ExperimentManagerImplDisable3PCsSyntheticTrialTest
: public ExperimentManagerImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ExperimentManagerImplDisable3PCsSyntheticTrialTest,
PRE_ExistingProfilesRegistersSyntheticTrial) { … }
IN_PROC_BROWSER_TEST_F(ExperimentManagerImplDisable3PCsSyntheticTrialTest,
ExistingProfilesRegistersSyntheticTrial) { … }
class ExperimentManagerImplSilentOnboardingSyntheticTrialTest
: public ExperimentManagerImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ExperimentManagerImplSilentOnboardingSyntheticTrialTest,
PRE_ExistingProfilesRegistersSyntheticTrial) { … }
IN_PROC_BROWSER_TEST_F(ExperimentManagerImplSilentOnboardingSyntheticTrialTest,
ExistingProfilesRegistersSyntheticTrial) { … }
#endif
}