Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6397)

Unified Diff: chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: BUILD Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..f1ba71fe93482fe17af625b5da64ae392de645ae
--- /dev/null
+++ b/chrome/browser/ui/views/payments/cvc_unmask_view_controller_browsertest.cc
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// 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") {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CvcUnmaskViewControllerTest);
+};
+
+IN_PROC_BROWSER_TEST_F(CvcUnmaskViewControllerTest, CvcSentToResponse) {
+ AddCreditCard(autofill::test::GetCreditCard()); // Visa.
+
+ InvokePaymentRequestUI();
+ ResetEventObserver(DialogEvent::DIALOG_CLOSED);
+ PayWithCreditCardAndWait(base::ASCIIToUTF16("012"));
+
+ ExpectBodyContains(std::vector<base::string16>{
+ base::UTF8ToUTF16("\"cardSecurityCode\": \"012\"")});
+}
+
+} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698