#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/permissions/scripting_permissions_modifier.h"
#include "chrome/browser/profiles/profile.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/sessions/content/session_tab_helper.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/background_script_executor.h"
#include "extensions/browser/permissions_manager.h"
#include "extensions/browser/script_executor.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/mojom/api_permission_id.mojom.h"
#include "extensions/common/permissions/permissions_data.h"
#include "extensions/test/permissions_manager_waiter.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
class UserHostRestrictionsBrowserTest
: public ExtensionApiTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsBrowserTest,
ExtensionsCannotRunOnUserRestrictedSites_BrowserCheck) { … }
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsBrowserTest,
ExtensionsCannotRunOnUserRestrictedSites_RendererCheck) { … }
IN_PROC_BROWSER_TEST_P(
UserHostRestrictionsBrowserTest,
ExtensionsCannotRunOnUserRestrictedSites_NetworkService) { … }
class UserHostRestrictionsWithPermittedSitesBrowserTest
: public UserHostRestrictionsBrowserTest { … };
UserHostRestrictionsWithPermittedSitesBrowserTest::
UserHostRestrictionsWithPermittedSitesBrowserTest() { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsWithPermittedSitesBrowserTest,
UserPermittedSites) { … }
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsWithPermittedSitesBrowserTest,
PRE_UserPermittedSitesArePersisted) { … }
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsWithPermittedSitesBrowserTest,
UserPermittedSitesArePersisted) { … }
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsWithPermittedSitesBrowserTest,
UserPermittedSitesAreAppliedOnWithholdingChange) { … }
IN_PROC_BROWSER_TEST_P(UserHostRestrictionsWithPermittedSitesBrowserTest,
UserPermittedSitesAndChromeFavicon) { … }
}