#include "chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/permissions/scripting_permissions_modifier.h"
#include "chrome/browser/extensions/permissions/site_permissions_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/views/extensions/extensions_menu_coordinator.h"
#include "chrome/browser/ui/views/extensions/extensions_menu_view_controller.h"
#include "chrome/browser/ui/views/extensions/extensions_request_access_button.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_button.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_container.h"
#include "chrome/browser/ui/views/extensions/extensions_toolbar_interactive_uitest.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/ui_test_utils.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/permissions_manager_waiter.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/button/toggle_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/view_utils.h"
namespace {
PermissionsManager;
ScriptingPermissionsModifier;
SitePermissionsHelper;
}
class ExtensionsMenuMainPageViewInteractiveUITest
: public ExtensionsToolbarUITest { … };
ExtensionsMenuMainPageViewInteractiveUITest::
ExtensionsMenuMainPageViewInteractiveUITest() { … }
void ExtensionsMenuMainPageViewInteractiveUITest::ShowMenu() { … }
ExtensionMenuItemView*
ExtensionsMenuMainPageViewInteractiveUITest::GetOnlyMenuItem() { … }
std::vector<extensions::ExtensionId>
ExtensionsMenuMainPageViewInteractiveUITest::
GetExtensionsInRequestAccessSection() { … }
std::vector<extensions::ExtensionId>
ExtensionsMenuMainPageViewInteractiveUITest::
GetExtensionsInRequestAccessButton() { … }
void ExtensionsMenuMainPageViewInteractiveUITest::ClickSiteSettingToggle() { … }
ExtensionsMenuMainPageView*
ExtensionsMenuMainPageViewInteractiveUITest::main_page() { … }
std::vector<ExtensionMenuItemView*>
ExtensionsMenuMainPageViewInteractiveUITest::menu_items() { … }
void ExtensionsMenuMainPageViewInteractiveUITest::ShowUi(
const std::string& name) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_ToggleSiteSetting …
#else
#define MAYBE_ToggleSiteSetting …
#endif
IN_PROC_BROWSER_TEST_F(ExtensionsMenuMainPageViewInteractiveUITest,
MAYBE_ToggleSiteSetting) { … }
IN_PROC_BROWSER_TEST_F(ExtensionsMenuMainPageViewInteractiveUITest,
SiteAccessToggle_RunAction) { … }
IN_PROC_BROWSER_TEST_F(ExtensionsMenuMainPageViewInteractiveUITest,
UpdatePageForActiveWebContentsChanges) { … }
IN_PROC_BROWSER_TEST_F(ExtensionsMenuMainPageViewInteractiveUITest,
SiteAccessRequestsForMultipleTabs) { … }