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

Side by Side Diff: ios/chrome/browser/payments/payment_request_coordinator_unittest.mm

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: fix ios test for realz 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 unified diff | Download patch
« no previous file with comments | « components/payments/core/payment_request_data_util_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/payments/payment_request_coordinator.h" 5 #import "ios/chrome/browser/payments/payment_request_coordinator.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/ios/wait_util.h" 10 #include "base/test/ios/wait_util.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 @selector(paymentRequestCoordinator:didConfirmWithPaymentResponse:); 151 @selector(paymentRequestCoordinator:didConfirmWithPaymentResponse:);
152 [delegate_mock onSelector:selector 152 [delegate_mock onSelector:selector
153 callBlockExpectation:^(PaymentRequestCoordinator* callerCoordinator, 153 callBlockExpectation:^(PaymentRequestCoordinator* callerCoordinator,
154 web::PaymentResponse paymentResponse) { 154 web::PaymentResponse paymentResponse) {
155 EXPECT_EQ(base::ASCIIToUTF16("4111111111111111"), 155 EXPECT_EQ(base::ASCIIToUTF16("4111111111111111"),
156 paymentResponse.details.card_number); 156 paymentResponse.details.card_number);
157 EXPECT_EQ(base::ASCIIToUTF16("Test User"), 157 EXPECT_EQ(base::ASCIIToUTF16("Test User"),
158 paymentResponse.details.cardholder_name); 158 paymentResponse.details.cardholder_name);
159 EXPECT_EQ(base::ASCIIToUTF16("11"), 159 EXPECT_EQ(base::ASCIIToUTF16("11"),
160 paymentResponse.details.expiry_month); 160 paymentResponse.details.expiry_month);
161 EXPECT_EQ(base::ASCIIToUTF16("2017"), 161 EXPECT_EQ(base::ASCIIToUTF16("2022"),
162 paymentResponse.details.expiry_year); 162 paymentResponse.details.expiry_year);
163 EXPECT_EQ(base::ASCIIToUTF16("123"), 163 EXPECT_EQ(base::ASCIIToUTF16("123"),
164 paymentResponse.details.card_security_code); 164 paymentResponse.details.card_security_code);
165 EXPECT_EQ(coordinator, callerCoordinator); 165 EXPECT_EQ(coordinator, callerCoordinator);
166 }]; 166 }];
167 [coordinator setDelegate:delegate_mock]; 167 [coordinator setDelegate:delegate_mock];
168 168
169 // Call the card unmasking delegate method. 169 // Call the card unmasking delegate method.
170 [coordinator fullCardRequestDidSucceedWithCard:credit_card_ 170 [coordinator fullCardRequestDidSucceedWithCard:credit_card_
171 CVC:base::ASCIIToUTF16("123")]; 171 CVC:base::ASCIIToUTF16("123")];
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 [coordinator setDelegate:delegate_mock]; 278 [coordinator setDelegate:delegate_mock];
279 [coordinator setBrowserState:browser_state_.get()]; 279 [coordinator setBrowserState:browser_state_.get()];
280 280
281 [coordinator start]; 281 [coordinator start];
282 // Short delay to allow animation to complete. 282 // Short delay to allow animation to complete.
283 base::test::ios::SpinRunLoopWithMaxDelay(base::TimeDelta::FromSecondsD(1)); 283 base::test::ios::SpinRunLoopWithMaxDelay(base::TimeDelta::FromSecondsD(1));
284 284
285 // Call the controller delegate method. 285 // Call the controller delegate method.
286 [coordinator paymentRequestViewControllerDidCancel:nil]; 286 [coordinator paymentRequestViewControllerDidCancel:nil];
287 } 287 }
OLDNEW
« no previous file with comments | « components/payments/core/payment_request_data_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698