#include "base/test/scoped_feature_list.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/permissions/quiet_notification_permission_ui_config.h"
#include "chrome/browser/permissions/quiet_notification_permission_ui_state.h"
#include "chrome/browser/permissions/system/system_permission_settings.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/test/test_browser_ui.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/page_info/page_info_bubble_view.h"
#include "chrome/browser/ui/views/permissions/chip/permission_chip_view.h"
#include "chrome/browser/ui/views/permissions/chip/permission_dashboard_controller.h"
#include "chrome/browser/ui/views/permissions/chip/permission_dashboard_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/permissions/permission_request_manager_test_api.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/content_settings/core/common/features.h"
#include "components/omnibox/browser/location_bar_model.h"
#include "components/omnibox/browser/omnibox_view.h"
#include "components/omnibox/browser/test_location_bar_model.h"
#include "components/permissions/test/permission_request_observer.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/gfx/animation/animation.h"
#include "ui/gfx/animation/animation_test_api.h"
#include "url/gurl.h"
namespace {
class ChipAnimationObserver : PermissionChipView::Observer { … };
class TestQuietNotificationPermissionUiSelector
: public permissions::PermissionUiSelector { … };
}
class LHSIndicatorsInteractiveUITest : public UiBrowserTest { … };
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_camera) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_microphone) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_cameraandmicrophone) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_camera_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_microphone_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_cameraandmicrophone_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_PageInfo_camera) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_PageInfo_mic) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_camera_and_mic) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_camera_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_mic_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_camera_and_mic_blocked) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest, InvokeUi_Camera_twice) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_camera_blocked_on_system_level) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_mic_blocked_on_system_level) { … }
IN_PROC_BROWSER_TEST_F(
LHSIndicatorsInteractiveUITest,
InvokeUi_PageInfo_camera_and_mic_blocked_on_system_level) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_Loud) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_Loud_Confirmation) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_VeryUnlikelyGrant) { … }
IN_PROC_BROWSER_TEST_F(
LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_VeryUnlikelyGrant_Confirmation) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_AbusiveRequests) { … }
IN_PROC_BROWSER_TEST_F(
LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_AbusiveRequests_Confirmation) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_EnabledInPrefs) { … }
IN_PROC_BROWSER_TEST_F(
LHSIndicatorsInteractiveUITest,
InvokeUi_NotificationsRequest_EnabledInPrefs_Confirmation) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_GeolocationRequest_Loud) { … }
IN_PROC_BROWSER_TEST_F(LHSIndicatorsInteractiveUITest,
InvokeUi_GeolocationRequest_Loud_Confirmation) { … }