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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 936273002: Shorten "American Express" to "Amex" in Chrome UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gclient sync Created 5 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 | « build/ios/grit_whitelist.txt ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 3503 matching lines...) Expand 10 before | Expand all | Expand 10 after
3514 SwitchToAutofill(); 3514 SwitchToAutofill();
3515 // Typically, MC and Visa are both valid. 3515 // Typically, MC and Visa are both valid.
3516 ValidateCCNumber(SECTION_CC, kTestCCNumberMaster, true); 3516 ValidateCCNumber(SECTION_CC, kTestCCNumberMaster, true);
3517 ValidateCCNumber(SECTION_CC, kTestCCNumberVisa, true); 3517 ValidateCCNumber(SECTION_CC, kTestCCNumberVisa, true);
3518 3518
3519 FormData form_data; 3519 FormData form_data;
3520 FormFieldData field; 3520 FormFieldData field;
3521 field.autocomplete_attribute = "billing cc-type"; 3521 field.autocomplete_attribute = "billing cc-type";
3522 field.option_contents.push_back(ASCIIToUTF16("Visa")); 3522 field.option_contents.push_back(ASCIIToUTF16("Visa"));
3523 field.option_values.push_back(ASCIIToUTF16("V")); 3523 field.option_values.push_back(ASCIIToUTF16("V"));
3524 field.option_contents.push_back(ASCIIToUTF16("American Express")); 3524 field.option_contents.push_back(ASCIIToUTF16("Amex"));
3525 field.option_values.push_back(ASCIIToUTF16("AX")); 3525 field.option_values.push_back(ASCIIToUTF16("AX"));
3526 form_data.fields.push_back(field); 3526 form_data.fields.push_back(field);
3527 ResetControllerWithFormData(form_data); 3527 ResetControllerWithFormData(form_data);
3528 controller()->Show(); 3528 controller()->Show();
3529 3529
3530 // MC is not valid because it's missing from FormData. 3530 // MC is not valid because it's missing from FormData.
3531 EXPECT_EQ(l10n_util::GetStringUTF16( 3531 EXPECT_EQ(l10n_util::GetStringUTF16(
3532 IDS_AUTOFILL_DIALOG_VALIDATION_UNACCEPTED_MASTERCARD), 3532 IDS_AUTOFILL_DIALOG_VALIDATION_UNACCEPTED_MASTERCARD),
3533 ValidateCCNumber(SECTION_CC, kTestCCNumberMaster, false)); 3533 ValidateCCNumber(SECTION_CC, kTestCCNumberMaster, false));
3534 ValidateCCNumber(SECTION_CC, kTestCCNumberVisa, true); 3534 ValidateCCNumber(SECTION_CC, kTestCCNumberVisa, true);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 EXPECT_EQ(ASCIIToUTF16("United States"), form_structure()->field(2)->value); 3637 EXPECT_EQ(ASCIIToUTF16("United States"), form_structure()->field(2)->value);
3638 EXPECT_EQ(ADDRESS_HOME_COUNTRY, 3638 EXPECT_EQ(ADDRESS_HOME_COUNTRY,
3639 form_structure()->field(3)->Type().GetStorableType()); 3639 form_structure()->field(3)->Type().GetStorableType());
3640 EXPECT_EQ(ASCIIToUTF16("US"), form_structure()->field(3)->value); 3640 EXPECT_EQ(ASCIIToUTF16("US"), form_structure()->field(3)->value);
3641 EXPECT_EQ(ADDRESS_HOME_COUNTRY, 3641 EXPECT_EQ(ADDRESS_HOME_COUNTRY,
3642 form_structure()->field(4)->Type().GetStorableType()); 3642 form_structure()->field(4)->Type().GetStorableType());
3643 EXPECT_EQ(ASCIIToUTF16("United States"), form_structure()->field(4)->value); 3643 EXPECT_EQ(ASCIIToUTF16("United States"), form_structure()->field(4)->value);
3644 } 3644 }
3645 3645
3646 } // namespace autofill 3646 } // namespace autofill
OLDNEW
« no previous file with comments | « build/ios/grit_whitelist.txt ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698