#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "content/browser/back_forward_cache_browsertest.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/content_navigation_policy.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/site_isolation_policy.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/navigation_handle_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/url_loader_interceptor.h"
#include "content/shell/browser/shell.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
_;
Each;
ElementsAre;
Not;
UnorderedElementsAreArray;
namespace content {
namespace {
void InsertSubFrameWithUrl(RenderFrameHost* rfh, std::string url) { … }
}
NotRestoredReason;
NotRestoredReasons;
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, Basic) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, BasicDocumentInitiated) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
NavigateBackForwardRepeatedly) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, WindowOpen) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, WindowOpenCrossSite) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
WindowOpenCrossSiteNavigateSameSite) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
WindowOpenCrossSiteWithSameSiteChild) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, WindowOpenThenClose) { … }
enum class NavigationSiteType { … };
class BackForwardCacheBrowserTestWithVaryingNavigationSite
: public BackForwardCacheBrowserTest,
public ::testing::WithParamInterface<NavigationSiteType> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(BackForwardCacheBrowserTestWithVaryingNavigationSite,
RelatedActiveContentsLoggingOnPageWithBlockingFeature) { … }
IN_PROC_BROWSER_TEST_P(
BackForwardCacheBrowserTestWithVaryingNavigationSite,
RelatedActiveContentsLoggingOnPageWithBlockingFeatureAndRAC) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
WindowOpen_SameSitePopupPendingDeletion) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
WindowOpen_UnrelatedSameSiteAndProcessTab) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, BasicIframe) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, SubframeSurviveCache1) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, SubframeSurviveCache2) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, SubframeSurviveCache3) { … }
IN_PROC_BROWSER_TEST_F(HighCacheSizeBackForwardCacheBrowserTest,
SubframeSurviveCache4) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheUnloadBrowserTest,
ConfirmUnloadEventNotFired) { … }
class BackForwardCacheStillLoadingBrowserTest
: public BackForwardCacheBrowserTest,
public ::testing::WithParamInterface<TestFrameType> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(BackForwardCacheStillLoadingBrowserTest,
DoesNotCacheIfFrameStillLoading) { … }
class BackForwardCacheStillNavigatingBrowserTest
: public BackForwardCacheBrowserTest,
public ::testing::WithParamInterface<TestFrameType> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(BackForwardCacheStillNavigatingBrowserTest,
DoesNotCacheNavigatingSubframe) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
FrameWithInvalidURLDoesntAffectCache) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, DoesNotCacheIfHttpError) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
DoesNotCacheIfPageUnreachable) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, Events) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, EventsForSubframes) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
EventsAfterDocumentInitiatedNavigation) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
EventsForPageIneligibleAfterPagehidePersisted) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
EventsForPageIneligibleBeforePagehide) { … }
enum class StickinessType { … };
class BackForwardCacheBrowserTestWithVaryingFrameAndFeatureStickinessType
: public BackForwardCacheBrowserTest,
public ::testing::WithParamInterface<
testing::tuple<TestFrameType, StickinessType>> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(
BackForwardCacheBrowserTestWithVaryingFrameAndFeatureStickinessType,
DISABLED_TestPagehidePersistedValue) { … }
IN_PROC_BROWSER_TEST_F(HighCacheSizeBackForwardCacheBrowserTest,
CanCacheMultiplesPagesOnSameDomain) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, Encoding) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
DoesNotCacheCrossSiteHttpPost) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, DISABLED_NavigationStart) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
CanUseCacheWhenNavigatingAwayToErrorPage) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, CoepReporter) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, CoopReporter) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, Coep) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
PagehideAndVisibilitychangeRuns) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
RendererHistory_BrowserInitiated) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
RendererHistory_RendererInitiated) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
NavigatingToAboutBlankDoesNotPreventCaching) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, NoContent) { … }
class CacheSizeOneBackForwardCacheBrowserTest
: public BackForwardCacheBrowserTest { … };
IN_PROC_BROWSER_TEST_F(CacheSizeOneBackForwardCacheBrowserTest,
ReplacedNavigationEntry) { … }
IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, ServerRedirect) { … }
class BackForwardCacheBrowsingContextStateBrowserTest
: public BackForwardCacheBrowserTest,
public ::testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(BackForwardCacheBrowsingContextStateBrowserTest,
SlowUnloadHandlerInIframe) { … }
}