#include <stddef.h>
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/site_data/page_specific_site_data_dialog.h"
#include "chrome/browser/ui/views/site_data/page_specific_site_data_dialog_controller.h"
#include "chrome/browser/ui/views/site_data/site_data_row_view.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/features.h"
#include "components/content_settings/core/common/pref_names.h"
#include "components/infobars/content/content_infobar_manager.h"
#include "components/page_info/core/features.h"
#include "components/prefs/pref_service.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/base/interaction/element_identifier.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/base_event_utils.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/any_widget_observer.h"
namespace {
const char kCookiesInUseDialogOpenedActionName[] = …;
const char kDeleteBrowsingDataActionName[] = …;
void ClickButton(views::Button* button) { … }
}
class PageSpecificSiteDataDialogBrowserTest
: public InProcessBrowserTest,
public ::testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest, CloseDialog) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
NavigateSameOrigin) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
DISABLED_NavigateAway) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
ChangeAndCloseTab) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
CloseDialogAndReopen) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest, DeleteMenuItem) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest, BlockMenuItem) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest, AllowMenuItem) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
ClearOnExitMenuItem) { … }
class PageSpecificSiteDataDialogPre3pcdBrowserTest
: public PageSpecificSiteDataDialogBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogPre3pcdBrowserTest,
PartitionedCookiesAndAllowedThirdParty) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
PartitionedCookiesAndBlockedThirdParty) { … }
IN_PROC_BROWSER_TEST_F(PageSpecificSiteDataDialogBrowserTest,
SameOriginNavigationDeletion) { … }