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..164716b816692c562d9c9470a32ada2defac8419 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/stringprintf.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( |
|
please use gerrit instead
2017/05/25 19:05:04
Shouldn't you be using l10n_util::GetStringFUTF8(I
macourteau
2017/05/25 19:32:08
Sure. Seems like it's _not_ using the same format
|
| + IDS_PAYMENTS_CARD_AND_ADDRESS_SETTINGS_SIGNED_IN); |
| + const std::string accountName = "example@gmail.com"; |
| + const std::string formattedString = |
| + base::StringPrintf(unformattedString.c_str(), accountName.c_str()); |
| + |
| + EXPECT_NE(unformattedString, formattedString); |
| +} |