#include "chrome/browser/profiles/profile_destroyer.h"
#include <vector>
#include "base/feature_list.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "build/buildflag.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
#include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_renderer_host.h"
#include "testing/gtest/include/gtest/gtest.h"
class ProfileDestroyerTest : public testing::Test,
public testing::WithParamInterface<bool> { … };
TEST_P(ProfileDestroyerTest, DestroyOriginalProfileImmediately) { … }
TEST_P(ProfileDestroyerTest, DestroyOriginalProfileDeferedByRenderProcessHost) { … }
TEST_P(ProfileDestroyerTest,
DestroyOriginalProfileDeferedByOffTheRecordRenderProcessHost) { … }
TEST_P(ProfileDestroyerTest,
DetroyBothProfileDeferedByMultipleRenderProcessHost) { … }
TEST_P(ProfileDestroyerTest, ImmediateOTRProfileDestructionNowWithNoHost) { … }
#if defined(GTEST_HAS_DEATH_TEST)
TEST_P(ProfileDestroyerTest, CrashOTRProfileDestructionNowWithHosts) { … }
#endif
TEST_P(ProfileDestroyerTest, ImmediateOTRProfileDestructionWithNoHosts) { … }
TEST_P(ProfileDestroyerTest, DelayedOTRProfileDestruction) { … }
TEST_P(ProfileDestroyerTest, RenderProcessAddedAfterDestroyRequested) { … }
TEST_P(ProfileDestroyerTest, DestructionRequestedTwiceWhileDelayedOTRProfile) { … }
TEST_P(ProfileDestroyerTest, MultipleOTRPRofile) { … }
#if defined(GTEST_HAS_DEATH_TEST)
TEST_P(ProfileDestroyerTest, CrashShutdownAllPendingProfilesOriginalWithHosts) { … }
TEST_P(ProfileDestroyerTest, CrashShutdownAllPendingProfilesOTRWithHosts) { … }
#endif
INSTANTIATE_TEST_SUITE_P(…);