#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/crx_file/id_util.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/service_worker_test_helpers.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "third_party/blink/public/common/notifications/platform_notification_data.h"
#include "url/gurl.h"
namespace extensions {
class ExtensionResourceRequestPolicyTest : public ExtensionApiTest { … };
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, OriginPrivileges) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
ExtensionCanLoadHostedAppIcons) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, Audio) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, Video) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebAccessibleResources) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
LinkToWebAccessibleResources) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebAccessibleResourcesWithCSP) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, Iframe) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
IframeNavigateToInaccessible) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
IframeNavigateToInaccessibleViaServerRedirect) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_LocalSubframe) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebNavigationToNonExistentResource) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebNavigationToNonExistentExtension) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_RemoteSubframe) { … }
IN_PROC_BROWSER_TEST_F(
ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_FormTargetingNewWindow) { … }
IN_PROC_BROWSER_TEST_F(
ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_ViaServiceWorkerNavigate) { … }
IN_PROC_BROWSER_TEST_F(
ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_ViaServiceWorkerOpenWindow) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_ViaHistoryBack) { … }
IN_PROC_BROWSER_TEST_F(
ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_ViaHistoryBackRemoteIframe) { … }
IN_PROC_BROWSER_TEST_F(
ExtensionResourceRequestPolicyTest,
WebNavigationToNonWebAccessibleResource_ViaHistoryBackLocalIframe) { … }
IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest,
NavigationToInvalidExtensionPage) { … }
}