chromium/chrome/browser/profiles/profiles_state_unittest.cc

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

#include "chrome/browser/profiles/profiles_state.h"

#include <string>

#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/supervised_user/core/common/features.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "content/public/test/browser_task_environment.h"
#include "profiles_state.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

#if !BUILDFLAG(IS_ANDROID)
// Params for the parameterized test IsGuestModeRequestedTest.
struct IsGuestModeRequestedTestParams {};

// clang-format off
const IsGuestModeRequestedTestParams kIsGuestModeRequestedParams[] {};
// clang-format on
#endif  // !BUILDFLAG(IS_ANDROID)

}  // namespace

#if !BUILDFLAG(IS_ANDROID)
class IsGuestModeRequestedTest
    : public testing::TestWithParam<IsGuestModeRequestedTestParams> {};

TEST_P(IsGuestModeRequestedTest, Requested) {}

INSTANTIATE_TEST_SUITE_P();

class IsGuestModeEnabledTest
    : public testing::TestWithParam<std::tuple<bool, bool>> {};

TEST_P(IsGuestModeEnabledTest, NoProfiles) {}

TEST_P(IsGuestModeEnabledTest, OneNormalProfile) {}

TEST_P(IsGuestModeEnabledTest, OneSupervisedProfile) {}

TEST_P(IsGuestModeEnabledTest, MixedProfiles) {}

INSTANTIATE_TEST_SUITE_P();
#else
        /*HideGuestModeForSupervisedUsersFeatureEnabled*/ testing::Values(
            false)));
#endif

#endif  // !BUILDFLAG(IS_ANDROID)