#include "chrome/browser/ui/webui/password_manager/promo_cards_handler.h"
#include <memory>
#include "base/json/values_util.h"
#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate_factory.h"
#include "chrome/browser/password_manager/password_manager_test_util.h"
#include "chrome/browser/ui/webui/password_manager/promo_card.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "components/password_manager/core/browser/password_store/test_password_store.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_registry.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/testing_pref_service.h"
#include "content/public/test/test_web_ui.h"
#include "testing/gmock/include/gmock/gmock.h"
IsEmpty;
Matcher;
Return;
Truly;
UnorderedElementsAre;
Value;
namespace password_manager {
namespace {
const char kTestCallbackId[] = …;
auto HasSamePromoCards(const std::vector<std::string>& promo_cards) { … }
class MockPromoCard : public PasswordPromoCardBase { … };
}
class PromoCardsHandlerTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(PromoCardsHandlerTest, GetAllPromoCards) { … }
TEST_F(PromoCardsHandlerTest, GetAvailablePromoCard) { … }
TEST_F(PromoCardsHandlerTest, TheOldestPromoReturned) { … }
TEST_F(PromoCardsHandlerTest, NoAvailablePromo) { … }
TEST_F(PromoCardsHandlerTest, RecordPromoDismissed) { … }
TEST_F(PromoCardsHandlerTest, RelaunchChromePromoHasTheHighestPriority) { … }
}