chromium/chrome/browser/metrics/variations/limited_entropy_randomization_browsertest.cc

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

#include "base/command_line.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_file.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/launcher/test_launcher.h"
#include "base/test/task_environment.h"
#include "base/test/test_switches.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/metrics/metrics_service.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service_factory.h"
#include "components/variations/active_field_trials.h"
#include "components/variations/hashing.h"
#include "components/variations/limited_entropy_mode_gate.h"
#include "components/variations/pref_names.h"
#include "components/variations/service/limited_entropy_synthetic_trial.h"
#include "components/variations/service/variations_service.h"
#include "components/variations/synthetic_trial_registry.h"
#include "components/variations/variations_switches.h"
#include "components/variations/variations_test_utils.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace variations {

const char kTestStudyName[] =;

namespace {

VariationsSeed CreateTestSeedWithLimitedEntropyLayer() {}

struct CommandLineOutput {};

CommandLineOutput RunWithCommandLine(const base::CommandLine& command_line) {}

}  // namespace

class LimitedEntropyRandomizationBrowserTest : public InProcessBrowserTest {};

// This is a MANUAL test that's only expected to be triggered from
// `LimitedEntropyRandomizationBrowserTestHelper`, which will set up the prefs
// values needed for this test. This test has two purposes: 1) verify that both
// the test study and the synthetic trial are registered, and 2) verify that the
// browser doesn't crash in any of the intermediate steps.
IN_PROC_BROWSER_TEST_F(LimitedEntropyRandomizationBrowserTest,
                       MANUAL_SyntheticTrialAndStudyRegistrationSubTest) {}

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

TEST_F(LimitedEntropyRandomizationBrowserTestHelper,
       SyntheticTrialAndStudyRegistration) {}

}  // namespace variations