Chromium Code Reviews| 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 @@ TEST_F(PaymentRequestViewControllerTest, TestModelPendingState) { |
| 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")); |
|
please use gerrit instead
2017/05/25 19:42:44
I would prefer to use ASCIIToUTF8 here for consist
macourteau
2017/05/25 19:53:47
ditto.
|
| + |
| + EXPECT_NE(unformattedString, formattedString); |
| +} |