| Index: chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc
|
| diff --git a/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc
|
| index 068a306612dc7d0ff3f9cc776eea7172c215acfc..7569316004ff2e1cfb76150f540514e57951330b 100644
|
| --- a/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc
|
| +++ b/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc
|
| @@ -8,17 +8,19 @@
|
|
|
| namespace payments {
|
|
|
| -class CvcUnmaskViewControllerTest : public PaymentRequestBrowserTestBase {
|
| +class PaymentRequestCvcUnmaskViewControllerTest
|
| + : public PaymentRequestBrowserTestBase {
|
| protected:
|
| - CvcUnmaskViewControllerTest()
|
| + PaymentRequestCvcUnmaskViewControllerTest()
|
| : PaymentRequestBrowserTestBase(
|
| "/payment_request_no_shipping_test.html") {}
|
|
|
| private:
|
| - DISALLOW_COPY_AND_ASSIGN(CvcUnmaskViewControllerTest);
|
| + DISALLOW_COPY_AND_ASSIGN(PaymentRequestCvcUnmaskViewControllerTest);
|
| };
|
|
|
| -IN_PROC_BROWSER_TEST_F(CvcUnmaskViewControllerTest, CvcSentToResponse) {
|
| +IN_PROC_BROWSER_TEST_F(PaymentRequestCvcUnmaskViewControllerTest,
|
| + CvcSentToResponse) {
|
| AddCreditCard(autofill::test::GetCreditCard()); // Visa.
|
|
|
| InvokePaymentRequestUI();
|
| @@ -28,4 +30,21 @@ IN_PROC_BROWSER_TEST_F(CvcUnmaskViewControllerTest, CvcSentToResponse) {
|
| ExpectBodyContains({"\"cardSecurityCode\": \"012\""});
|
| }
|
|
|
| +// Test that going in the CVC editor, backing out and opening it again to pay
|
| +// does not crash.
|
| +IN_PROC_BROWSER_TEST_F(PaymentRequestCvcUnmaskViewControllerTest,
|
| + OpenGoBackOpenPay) {
|
| + AddCreditCard(autofill::test::GetCreditCard()); // Visa.
|
| +
|
| + InvokePaymentRequestUI();
|
| + OpenCVCPromptWithCVC(base::ASCIIToUTF16("012"));
|
| +
|
| + // Go back before confirming the CVC.
|
| + ClickOnBackArrow();
|
| +
|
| + // Now pay for real.
|
| + PayWithCreditCardAndWait(base::ASCIIToUTF16("012"));
|
| + ExpectBodyContains({"\"cardSecurityCode\": \"012\""});
|
| +}
|
| +
|
| } // namespace payments
|
|
|