#include "content/browser/renderer_host/spare_render_process_host_manager.h"
#include <utility>
#include "base/callback_list.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_content_browser_client.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/no_renderer_crashes_assertion.h"
#include "content/public/test/test_service.mojom.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
class SpareRenderProcessHostManagerTest : public ContentBrowserTest,
public RenderProcessHostObserver { … };
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
DeferredSpareProcess) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
WarmupSpareRenderProcessHostDuringDefer) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRenderProcessHostTaken) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
CreateWithTimeoutDestroyedAfterTimeout) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
MultipleCreateOverrideBehavior) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRenderProcessHostNotTaken) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRenderProcessHostKilled) { … }
class SpareRendererContentBrowserClient
: public ContentBrowserTestContentBrowserClient { … };
class NonSpareRendererContentBrowserClient
: public ContentBrowserTestContentBrowserClient { … };
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRendererSurpressedMaxProcesses) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRendererOnProcessReuse) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRenderProcessHostDuringShutdown) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareRendererDuringClosing) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
DestroyTimeoutDuringClosing) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareProcessVsCustomStoragePartition) { … }
class RenderProcessHostObserverCounter : public RenderProcessHostObserver { … };
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest,
SpareVsDisableKeepAliveRefCount) { … }
IN_PROC_BROWSER_TEST_F(SpareRenderProcessHostManagerTest, SpareVsFastShutdown) { … }
}