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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm

Issue 2905323002: Reland of Fixes formatting of the signed-in setting string on iOS. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/ui/payments/payment_request_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm b/ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm
index 7fd061fdd7e1bf2c257a067c04102f8cc1c1f403..f42b497a237736108d85bbc36ac384b5edf614e4 100644
--- a/ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_view_controller_unittest.mm
@@ -6,6 +6,7 @@
#include "base/mac/foundation_util.h"
#include "base/memory/ptr_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/credit_card.h"
@@ -24,6 +25,7 @@
#include "ios/chrome/grit/ios_strings.h"
#include "ios/web/public/payments/payment_request.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -201,3 +203,13 @@
id item = GetCollectionViewItem(0, 0);
EXPECT_TRUE([item isMemberOfClass:[StatusItem class]]);
}
+
+TEST_F(PaymentRequestViewControllerTest, TestSignedInStringFormatting) {
+ const std::string unformattedString = l10n_util::GetStringUTF8(
+ IDS_PAYMENTS_CARD_AND_ADDRESS_SETTINGS_SIGNED_IN);
+ const std::string formattedString = l10n_util::GetStringFUTF8(
+ IDS_PAYMENTS_CARD_AND_ADDRESS_SETTINGS_SIGNED_IN,
+ base::ASCIIToUTF16("example@gmail.com"));
+
+ EXPECT_NE(unformattedString, formattedString);
+}
« no previous file with comments | « ios/chrome/browser/ui/payments/payment_request_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698