#include "extensions/browser/site_access_requests_helper.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/permissions/active_tab_permission_granter.h"
#include "chrome/browser/extensions/permissions/scripting_permissions_modifier.h"
#include "chrome/browser/extensions/permissions/site_permissions_helper.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/test_browser_window.h"
#include "components/crx_file/id_util.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/web_contents_tester.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/permissions_manager.h"
#include "extensions/browser/unloaded_extension_reason.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/url_pattern.h"
#include "extensions/test/permissions_manager_waiter.h"
namespace extensions {
class SiteAccessRequestsHelperUnittest : public ExtensionServiceTestBase { … };
scoped_refptr<const Extension>
SiteAccessRequestsHelperUnittest::InstallExtensionAndWithholdHostPermissions(
const std::string& name,
const std::string& host_permission) { … }
scoped_refptr<const Extension>
SiteAccessRequestsHelperUnittest::InstallExtensionWithActiveTab(
const std::string& name) { … }
content::WebContents* SiteAccessRequestsHelperUnittest::AddTab(
const GURL& url) { … }
Browser* SiteAccessRequestsHelperUnittest::browser() { … }
void SiteAccessRequestsHelperUnittest::SetUp() { … }
void SiteAccessRequestsHelperUnittest::TearDown() { … }
TEST_F(SiteAccessRequestsHelperUnittest, AddAndRemoveRequests) { … }
TEST_F(SiteAccessRequestsHelperUnittest,
AddAndRemoveRequestsWithPatternFilter) { … }
TEST_F(SiteAccessRequestsHelperUnittest, UserDismissedRequest) { … }
TEST_F(SiteAccessRequestsHelperUnittest,
RequestRemovedOnCrossOriginNavigation) { … }
TEST_F(SiteAccessRequestsHelperUnittest, RequestUpdatedOnPageNavigations) { … }
TEST_F(SiteAccessRequestsHelperUnittest,
RequestRemovedWhenExtensionHasSiteAccess) { … }
TEST_F(SiteAccessRequestsHelperUnittest,
RequestRemovedWhenExtensionHasGrantedActiveTab) { … }
TEST_F(SiteAccessRequestsHelperUnittest,
RequestRemovedWhenExtensionIsUnloaded) { … }
}