#include "chrome/browser/ui/views/site_data/page_specific_site_data_dialog.h"
#include "base/feature_list.h"
#include "base/test/bind.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/page_specific_content_settings_delegate.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/browsing_data/content/fake_browsing_data_model.h"
#include "components/content_settings/browser/page_specific_content_settings.h"
#include "components/content_settings/common/content_settings_manager.mojom.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/pref_names.h"
#include "content/public/browser/browsing_data_remover.h"
#include "content/public/browser/cookie_access_details.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace {
StorageType;
const char kCurrentUrl[] = …;
const char kThirdPartyUrl[] = …;
const char kExampleUrl[] = …;
void ValidateAllowedUnpartitionedSites(
test::PageSpecificSiteDataDialogTestApi* delegate,
const std::vector<GURL>& expected_sites_in_order) { … }
blink::StorageKey CreateUnpartitionedStorageKey(const GURL& url) { … }
blink::StorageKey CreateThirdPartyStorageKey(const GURL& url,
const GURL& top_url) { … }
}
class PageSpecificSiteDataDialogUnitTest
: public ChromeRenderViewHostTestHarness { … };
TEST_F(PageSpecificSiteDataDialogUnitTest, CookieAccessed) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, QuotaStorageAccessedFirstParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndCookieAccessedFirstParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndPartitionedCookieAccessedFirstParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, QuotaStorageAccessedThirdParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndCookieAccessedThirdParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndPartitionedCookieAccessedThirdParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, QuotaStorageAccessedMixedParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndCookieAccessedMixedParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest,
QuotaStorageAndPartitionedCookieAccessedMixedParty) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, TrustTokenAccessed) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, RemovePartitionedStorage) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, ServiceWorkerAccessed) { … }
TEST_F(PageSpecificSiteDataDialogUnitTest, RemoveBrowsingData) { … }