#include "content/browser/renderer_host/navigation_policy_container_builder.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/navigation_state_keep_alive.h"
#include "content/browser/renderer_host/policy_container_host.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/shell/browser/shell.h"
#include "services/network/public/mojom/content_security_policy.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/url_constants.h"
namespace content {
namespace {
ByRef;
Eq;
IsNull;
Pointee;
const PolicyContainerPolicies& GetPolicies(RenderFrameHostImpl* frame) { … }
GURL AboutBlankUrl() { … }
GURL AboutSrcdocUrl() { … }
network::mojom::ContentSecurityPolicyPtr MakeTestCSP() { … }
}
class NavigationPolicyContainerBuilderBrowserTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
HistoryPoliciesWithoutEntry) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
HistoryPoliciesForNetworkScheme) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
HistoryPoliciesForBlankUrl) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
HistoryPoliciesForNonCurentEntry) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
CreatePolicyContainerForBlink) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesAboutBlankWithInitiatorAndHistory) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesAboutSrcDocWithParentAndHistory) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesErrorPageWithHistory) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
AccessHistoryAfterComputingPolicies) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
NoHistoryPoliciesInheritedForNonLocalUrlsOnReload) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
NoHistoryPoliciesInheritedForNetworkUrlsOnBack) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
ResetForCrossDocumentRestartHistoryPolicies) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
InitiatorPoliciesWithInitiator) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesAboutBlankWithInitiator) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesBlobWithInitiator) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
FinalPoliciesAboutBlankWithInitiatorAndAdditionalCSP) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
AccessInitiatorAfterComputingPolicies) { … }
IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest,
ResetForCrossDocumentRestartInitiatorPolicies) { … }
}