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

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

Issue 2710683012: [Payment Request] Payment request summary view pending state (Closed)
Patch Set: rebase Created 3 years, 10 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 | « ios/chrome/browser/payments/shipping_option_selection_view_controller.mm ('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/shipping_option_selection_view_controller.h " 5 #import "ios/chrome/browser/payments/shipping_option_selection_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 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/autofill/core/browser/test_personal_data_manager.h" 10 #include "components/autofill/core/browser/test_personal_data_manager.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 [GetShippingOptionSelectionViewController() loadModel]; 80 [GetShippingOptionSelectionViewController() loadModel];
81 81
82 ASSERT_EQ(1, NumberOfSections()); 82 ASSERT_EQ(1, NumberOfSections());
83 // There should be 3 items now in total. 83 // There should be 3 items now in total.
84 ASSERT_EQ(3U, static_cast<unsigned int>(NumberOfItemsInSection(0))); 84 ASSERT_EQ(3U, static_cast<unsigned int>(NumberOfItemsInSection(0)));
85 85
86 // The first item should also be of type TextAndMessageItem. 86 // The first item should also be of type TextAndMessageItem.
87 item = GetCollectionViewItem(0, 0); 87 item = GetCollectionViewItem(0, 0);
88 EXPECT_TRUE([item isMemberOfClass:[PaymentsTextItem class]]); 88 EXPECT_TRUE([item isMemberOfClass:[PaymentsTextItem class]]);
89 89
90 // Test the loading state. 90 // Test the pending state.
91 [GetShippingOptionSelectionViewController() setIsLoading:YES]; 91 [GetShippingOptionSelectionViewController() setPending:YES];
92 [GetShippingOptionSelectionViewController() loadModel]; 92 [GetShippingOptionSelectionViewController() loadModel];
93 93
94 ASSERT_EQ(1, NumberOfSections()); 94 ASSERT_EQ(1, NumberOfSections());
95 // There should be only one item. 95 // There should be only one item.
96 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(0))); 96 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(0)));
97 97
98 // The item should be of type StatusItem. 98 // The item should be of type StatusItem.
99 item = GetCollectionViewItem(0, 0); 99 item = GetCollectionViewItem(0, 0);
100 EXPECT_TRUE([item isMemberOfClass:[StatusItem class]]); 100 EXPECT_TRUE([item isMemberOfClass:[StatusItem class]]);
101 } 101 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/payments/shipping_option_selection_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698