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

Unified Diff: ios/chrome/browser/payments/payment_items_display_view_controller.mm

Issue 2588913002: EarlGrey tests for Payment Request (base CL) (Closed)
Patch Set: Moved everything except the egtest upsream Created 4 years 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: ios/chrome/browser/payments/payment_items_display_view_controller.mm
diff --git a/ios/chrome/browser/payments/payment_items_display_view_controller.mm b/ios/chrome/browser/payments/payment_items_display_view_controller.mm
index 011993caebd39d76bffa5e4556437c379b2e3861..1a4661fc06119f8054ec23de3c9997559f5a58fa 100644
--- a/ios/chrome/browser/payments/payment_items_display_view_controller.mm
+++ b/ios/chrome/browser/payments/payment_items_display_view_controller.mm
@@ -8,6 +8,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "components/autofill/core/browser/credit_card.h"
+#include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/payments/cells/order_summary_line_item.h"
#import "ios/chrome/browser/payments/cells/order_summary_total_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item.h"
@@ -22,6 +23,7 @@
NSString* const kPaymentItemsDisplayCollectionViewId =
@"kPaymentItemsDisplayCollectionViewId";
+NSString* const kPaymentItemsDisplayItemId = @"kPaymentItemsDisplayItemId";
namespace {
@@ -66,6 +68,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon backIcon]
target:nil
action:@selector(onReturn)];
+ [returnButton
+ setAccessibilityLabel:l10n_util::GetNSString(IDS_ACCNAME_BACK)];
[self navigationItem].leftBarButtonItem = returnButton;
// Set up right (pay) button.
@@ -142,6 +146,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
// Add the total entry.
OrderSummaryTotalItem* totalItem = [[[OrderSummaryTotalItem alloc]
initWithType:ItemTypePaymentItem] autorelease];
+ totalItem.accessibilityIdentifier = kPaymentItemsDisplayItemId;
totalItem.text = base::SysUTF16ToNSString(_total.label);
NSString* currencyCode = base::SysUTF16ToNSString(_total.amount.currency);
@@ -157,6 +162,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
web::PaymentItem paymentItem = _paymentItems[i];
OrderSummaryLineItem* paymentItemItem = [[[OrderSummaryLineItem alloc]
initWithType:ItemTypePaymentItem] autorelease];
+ paymentItemItem.accessibilityIdentifier = kPaymentItemsDisplayItemId;
paymentItemItem.text = base::SysUTF16ToNSString(paymentItem.label);
NSString* currencyCode =

Powered by Google App Engine
This is Rietveld 408576698