#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_test_util.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/webui/profile_helper.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/profile_deletion_observer.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/browsing_data_remover.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browsing_data_remover_test_util.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/test_web_ui.h"
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chrome/browser/lacros/browser_test_util.h"
#endif
namespace {
Profile* CreateProfile() { … }
class ExpectBrowserActivationForProfile : public BrowserListObserver { … };
class BrowserAddedObserver : public BrowserListObserver { … };
}
class ProfileHelperTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ProfileHelperTest, OpenNewWindowForProfile) { … }
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
IN_PROC_BROWSER_TEST_F(ProfileHelperTest, DeleteSoleProfile) { … }
#endif
IN_PROC_BROWSER_TEST_F(ProfileHelperTest, DeleteActiveProfile) { … }
class ProfileHelperTestWithDestroyProfile
: public ProfileHelperTest,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(ProfileHelperTestWithDestroyProfile,
DISABLED_DeleteInactiveProfile) { … }
#if BUILDFLAG(IS_CHROMEOS)
INSTANTIATE_TEST_SUITE_P(DestroyProfileOnBrowserClose,
ProfileHelperTestWithDestroyProfile,
testing::Values(false));
#else
INSTANTIATE_TEST_SUITE_P(…);
#endif