#include "chrome/browser/ui/plus_addresses/plus_address_creation_controller_desktop.h"
#include <memory>
#include <string>
#include "base/functional/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "build/build_config.h"
#include "chrome/browser/plus_addresses/plus_address_service_factory.h"
#include "chrome/browser/profiles/profile_test_util.h"
#include "chrome/browser/ui/plus_addresses/plus_address_creation_controller.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/plus_addresses/fake_plus_address_service.h"
#include "components/plus_addresses/features.h"
#include "components/plus_addresses/metrics/plus_address_metrics.h"
#include "components/plus_addresses/plus_address_service.h"
#include "components/plus_addresses/plus_address_test_environment.h"
#include "components/plus_addresses/plus_address_types.h"
#include "components/plus_addresses/settings/fake_plus_address_setting_service.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "content/public/browser/browser_context.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace plus_addresses {
namespace {
constexpr char kPlusAddressModalEventHistogram[] = …;
constexpr base::TimeDelta kDuration = …;
std::string FormatModalDurationMetrics(
metrics::PlusAddressModalCompletionStatus status) { … }
}
class PlusAddressCreationControllerDesktopEnabledTest
: public ChromeRenderViewHostTestHarness { … };
TEST_F(PlusAddressCreationControllerDesktopEnabledTest, DirectCallback) { … }
TEST_F(PlusAddressCreationControllerDesktopEnabledTest, OnConfirmedError) { … }
TEST_F(PlusAddressCreationControllerDesktopEnabledTest, OnReservedError) { … }
TEST_F(PlusAddressCreationControllerDesktopEnabledTest,
ReserveGivesConfirmedAddress_DoesntConfirmAgain) { … }
TEST_F(PlusAddressCreationControllerDesktopEnabledTest,
StoredPlusProfileClearedOnDialogDestroyed) { … }
TEST_F(PlusAddressCreationControllerDesktopEnabledTest, ModalCanceled) { … }
class PlusAddressCreationControllerDesktopDisabledTest
: public ChromeRenderViewHostTestHarness { … };
TEST_F(PlusAddressCreationControllerDesktopDisabledTest, NullService) { … }
}