#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/strcat.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/password_manager/password_manager_test_base.h"
#include "chrome/browser/password_manager/passwords_navigation_observer.h"
#include "chrome/browser/password_manager/profile_password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/password_manager/core/browser/password_bubble_experiment.h"
#include "components/password_manager/core/browser/password_form.h"
#include "components/password_manager/core/browser/password_store/test_password_store.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/prerender_test_util.h"
#include "net/dns/mock_host_resolver.h"
namespace {
MatchesFormExceptStore;
ElementsAre;
Pair;
SizeIs;
class CredentialManagerBrowserTest : public PasswordManagerBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
AccountChooserWithOldCredentialAndNavigation) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreExistingCredentialIsNoOp) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreUpdatesPasswordOfExistingCredential) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreUpdatesPasswordOfExistingCredentialWithAttributes) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreSavesPSLMatchedCredential) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
UpdatingPSLMatchedCredentialCreatesSecondEntry) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
ObsoleteHttpCredentialMovedOnMigrationToHstsSite) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
AutoSigninOldCredentialAndNavigation) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreInUnloadHandler_SameSite_OnDemandMojoPipe) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreInUnloadHandler_SameSite_PreestablishedPipe) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreInUnloadHandler_CrossSite_OnDemandMojoPipe) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
StoreInUnloadHandler_CrossSite_PreestablishedPipe) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
MojoConnectionRecreatedAfterNavigation) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, SaveViaAPIAndAutofill) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, UpdateViaAPIAndAutofill) { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, CredentialsAutofilled) { … }
class CredentialManagerPrerenderBrowserTest
: public CredentialManagerBrowserTest { … };
IN_PROC_BROWSER_TEST_F(CredentialManagerPrerenderBrowserTest,
BindCredentialManagerInPrerender) { … }
class CredentialManagerAvatarTest : public PasswordManagerBrowserTestBase { … };
const char CredentialManagerAvatarTest::kAvatarOrigin[] = …;
const char CredentialManagerAvatarTest::kAvatarPath[] = …;
const char CredentialManagerAvatarTest::kLoginPath[] = …;
void CredentialManagerAvatarTest::AddPasswordForURL(const GURL& url) { … }
void CredentialManagerAvatarTest::WaitForAvatarCounter(size_t expected) { … }
std::unique_ptr<net::test_server::HttpResponse>
CredentialManagerAvatarTest::HandleRequest(
const net::test_server::HttpRequest& request) { … }
void CredentialManagerAvatarTest::OnIncrementAvatarCounter() { … }
IN_PROC_BROWSER_TEST_F(CredentialManagerAvatarTest,
AvatarFetchIsolatedPerOrigin) { … }
}