#include "base/files/file_path.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/version_info/channel.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "extensions/common/extension_features.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace extensions {
namespace {
static constexpr char kManifestStub[] = …;
static constexpr char kFetchResourceScriptTemplate[] = …;
class WebAccessibleResourcesBrowserTest : public ExtensionBrowserTest { … };
class WebAccessibleResourcesNonGuidBrowserTest
: public WebAccessibleResourcesBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebAccessibleResourcesBrowserTest,
UseDynamicUrlInFetch) { … }
IN_PROC_BROWSER_TEST_F(WebAccessibleResourcesBrowserTest,
UseDynamicUrlInIframe) { … }
class ParameterizedWebAccessibleResourcesBrowserTest
: public WebAccessibleResourcesBrowserTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(ParameterizedWebAccessibleResourcesBrowserTest,
DeclarativeNetRequest) { … }
IN_PROC_BROWSER_TEST_F(WebAccessibleResourcesNonGuidBrowserTest,
UseDynamicUrlInFetch) { … }
IN_PROC_BROWSER_TEST_P(ParameterizedWebAccessibleResourcesBrowserTest,
WebRequestRedirectFromScript) { … }
IN_PROC_BROWSER_TEST_P(ParameterizedWebAccessibleResourcesBrowserTest,
WebRequestRedirectFromPage) { … }
IN_PROC_BROWSER_TEST_P(ParameterizedWebAccessibleResourcesBrowserTest,
DNRRedirect) { … }
}
}