#include <algorithm>
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/ui/views/payments/editor_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/browser/ui/views/payments/validating_textfield.h"
#include "components/autofill/core/browser/address_data_manager.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/geo/autofill_country.h"
#include "components/autofill/core/browser/geo/test_region_data_loader.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/ui/country_combobox_model.h"
#include "components/autofill/core/browser/ui/region_combobox_model.h"
#include "components/payments/content/payment_request_spec.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/null_storage.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/label.h"
namespace payments {
namespace {
const char kLocale[] = …;
const char16_t kNameFull[] = …;
const char16_t kHomeAddress[] = …;
const char16_t kHomeCity[] = …;
const char16_t kHomeZip[] = …;
const char16_t kHomePhone[] = …;
const char kAnyState[] = …;
const char16_t kAnyState16[] = …;
const char kAnyStateCode[] = …;
const char16_t kCountryWithoutStates[] = …;
const char16_t kCountryWithoutStatesCode[] = …;
const char16_t kCountryWithoutStatesPhoneNumber[] = …;
const base::Time kJanuary2017 = …;
}
class DISABLED_PaymentRequestShippingAddressEditorTest
: public PaymentRequestBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
SyncData) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
DISABLED_EnterAcceleratorSyncData) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
DISABLED_AsyncData) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
SwitchingCountryUpdatesViewAndKeepsValues) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
FailToLoadRegionData) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
TimingOutRegionData) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
SelectingIncompleteAddress) { … }
#if BUILDFLAG(IS_OZONE)
#define MAYBE_FocusFirstField_Name …
#else
#define MAYBE_FocusFirstField_Name …
#endif
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
MAYBE_FocusFirstField_Name) { … }
#if BUILDFLAG(IS_OZONE)
#define MAYBE_FocusFirstInvalidField_NotName …
#else
#define MAYBE_FocusFirstInvalidField_NotName …
#endif
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
MAYBE_FocusFirstInvalidField_NotName) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
AddInternationalPhoneNumberFromOtherCountry) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
AddPossiblePhoneNumber) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
AddImpossiblePhoneNumber) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
UpdateToCountryWithoutState) { … }
IN_PROC_BROWSER_TEST_F(
DISABLED_PaymentRequestShippingAddressEditorTest,
NoErrorLabelForInternationalPhoneNumberFromOtherCountry) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoErrorLabelForPossibleButInvalidPhoneNumber) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
ErrorLabelForImpossiblePhoneNumber) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
CountryButNoState) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
CountryAndInvalidState) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoCountryNoState) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoCountryInvalidState) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoCountryValidState_SyncRegionLoad) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoCountryValidState_AsyncRegionLoad) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
DefaultRegion_RegionCode) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
DefaultRegion_RegionName) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
NoCountryProfileDoesntSetCountryToLocale) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
SyncDataInIncognito) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
RetryWithShippingAddressErrors) { … }
IN_PROC_BROWSER_TEST_F(
DISABLED_PaymentRequestShippingAddressEditorTest,
RetryWithShippingAddressErrors_HasSameValueButDifferentErrorsShown) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
RetryWithShippingAddressErrors_NoRequestShippingOption) { … }
IN_PROC_BROWSER_TEST_F(DISABLED_PaymentRequestShippingAddressEditorTest,
UpdateWithShippingAddressErrors) { … }
}