OLD | NEW |
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/ui/payments/payment_request_edit_view_controller.h" | 5 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.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 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" | 9 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" |
10 #import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" | 10 #import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 @synthesize consumer = _consumer; | 35 @synthesize consumer = _consumer; |
36 | 36 |
37 - (CollectionViewItem*)headerItem { | 37 - (CollectionViewItem*)headerItem { |
38 return [[CollectionViewTextItem alloc] init]; | 38 return [[CollectionViewTextItem alloc] init]; |
39 } | 39 } |
40 | 40 |
41 - (BOOL)shouldHideBackgroundForHeaderItem { | 41 - (BOOL)shouldHideBackgroundForHeaderItem { |
42 return NO; | 42 return NO; |
43 } | 43 } |
44 | 44 |
| 45 - (void)formatValueForEditorField:(EditorField*)field { |
| 46 } |
| 47 |
45 - (UIImage*)iconIdentifyingEditorField:(EditorField*)field { | 48 - (UIImage*)iconIdentifyingEditorField:(EditorField*)field { |
46 return nil; | 49 return nil; |
47 } | 50 } |
48 | 51 |
49 - (void)setConsumer:(id<PaymentRequestEditConsumer>)consumer { | 52 - (void)setConsumer:(id<PaymentRequestEditConsumer>)consumer { |
50 _consumer = consumer; | 53 _consumer = consumer; |
51 [self.consumer setEditorFields:@[ | 54 [self.consumer setEditorFields:@[ |
52 [[EditorField alloc] initWithAutofillUIType:AutofillUITypeProfileFullName | 55 [[EditorField alloc] initWithAutofillUIType:AutofillUITypeProfileFullName |
53 fieldType:EditorFieldTypeTextField | 56 fieldType:EditorFieldTypeTextField |
54 label:@"" | 57 label:@"" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(3))); | 126 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(3))); |
124 item = GetCollectionViewItem(3, 0); | 127 item = GetCollectionViewItem(3, 0); |
125 EXPECT_TRUE([item isMemberOfClass:[CollectionViewSwitchItem class]]); | 128 EXPECT_TRUE([item isMemberOfClass:[CollectionViewSwitchItem class]]); |
126 | 129 |
127 // The footer section contains one item which is of the type | 130 // The footer section contains one item which is of the type |
128 // CollectionViewFooterItem. | 131 // CollectionViewFooterItem. |
129 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(3))); | 132 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(3))); |
130 item = GetCollectionViewItem(4, 0); | 133 item = GetCollectionViewItem(4, 0); |
131 EXPECT_TRUE([item isMemberOfClass:[CollectionViewFooterItem class]]); | 134 EXPECT_TRUE([item isMemberOfClass:[CollectionViewFooterItem class]]); |
132 } | 135 } |
OLD | NEW |