#include "chrome/browser/profile_resetter/profile_resetter.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "chrome/browser/profile_resetter/profile_resetter_test_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_access_result.h"
#include "net/cookies/cookie_util.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
namespace {
const char kCookieName[] = …;
const char kCookieValue[] = …;
const char kCookieHostname[] = …;
BrowserThread;
class RemoveCookieTester { … };
RemoveCookieTester::RemoveCookieTester(Profile* profile)
: … { … }
RemoveCookieTester::~RemoveCookieTester() { … }
bool RemoveCookieTester::GetCookie(const std::string& host,
net::CanonicalCookie* cookie) { … }
void RemoveCookieTester::AddCookie(const std::string& host,
const std::string& name,
const std::string& value) { … }
void RemoveCookieTester::GetCookieListCallback(
const net::CookieAccessResultList& cookies,
const net::CookieAccessResultList& excluded_cookies) { … }
void RemoveCookieTester::SetCanonicalCookieCallback(
net::CookieAccessResult result) { … }
void RemoveCookieTester::BlockUntilNotified() { … }
void RemoveCookieTester::Notify() { … }
class ProfileResetTest : public InProcessBrowserTest,
public ProfileResetterTestBase { … };
IN_PROC_BROWSER_TEST_F(ProfileResetTest, ResetCookiesAndSiteData) { … }
}