Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d688751b2122f89c621894088c8b08d88e6374a4 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// // Use of this source code is governed by a BSD-style license that can be |
|
Mathieu
2017/04/05 00:02:23
fix
anthonyvd
2017/04/05 02:12:37
Done.
|
| +// // found in the LICENSE file. |
| + |
| +#include "base/strings/utf_string_conversions.h" |
| +#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" |
| +#include "components/autofill/core/browser/autofill_test_utils.h" |
| + |
| +namespace payments { |
| + |
| +class CvcUnmaskViewControllerTest : public PaymentRequestBrowserTestBase { |
| + protected: |
| + CvcUnmaskViewControllerTest() |
| + : PaymentRequestBrowserTestBase( |
| + "/payment_request_no_shipping_test.html") {} |
| + |
| + PersonalDataLoadedObserverMock personal_data_observer_; |
|
Mathieu
2017/04/05 00:02:23
remove?
anthonyvd
2017/04/05 02:12:37
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(CvcUnmaskViewControllerTest); |
| +}; |
| + |
| +IN_PROC_BROWSER_TEST_F(CvcUnmaskViewControllerTest, CvcSentToResponse) { |
| + autofill::CreditCard card = autofill::test::GetCreditCard(); |
| + AddCreditCard(card); |
|
Mathieu
2017/04/05 00:02:23
AddCreditCard(autofill::test::GetCreditCard()); /
anthonyvd
2017/04/05 02:12:37
Done.
|
| + |
| + InvokePaymentRequestUI(); |
| + ResetEventObserver(DialogEvent::DIALOG_CLOSED); |
| + PayWithCreditCardAndWait(base::ASCIIToUTF16("012")); |
| + |
| + ExpectBodyContains(std::vector<base::string16>{ |
| + base::UTF8ToUTF16("\"cardSecurityCode\": \"012\"")}); |
| +} |
| + |
| +} // namespace payments |