OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 11 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 12 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 13 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
13 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" | 14 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
14 #include "chrome/browser/ui/autofill/data_model_wrapper.h" | 15 #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
15 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 16 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
16 #include "chrome/browser/ui/autofill/testable_autofill_dialog_view.h" | 17 #include "chrome/browser/ui/autofill/testable_autofill_dialog_view.h" |
17 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
| 22 #include "components/autofill/content/browser/wallet/mock_wallet_client.h" |
21 #include "components/autofill/content/browser/wallet/wallet_test_util.h" | 23 #include "components/autofill/content/browser/wallet/wallet_test_util.h" |
22 #include "components/autofill/core/browser/autofill_common_test.h" | 24 #include "components/autofill/core/browser/autofill_common_test.h" |
23 #include "components/autofill/core/browser/autofill_metrics.h" | 25 #include "components/autofill/core/browser/autofill_metrics.h" |
24 #include "components/autofill/core/browser/test_personal_data_manager.h" | 26 #include "components/autofill/core/browser/test_personal_data_manager.h" |
25 #include "components/autofill/core/browser/validation.h" | 27 #include "components/autofill/core/browser/validation.h" |
26 #include "components/autofill/core/common/autofill_switches.h" | 28 #include "components/autofill/core/common/autofill_switches.h" |
27 #include "components/autofill/core/common/form_data.h" | 29 #include "components/autofill/core/common/form_data.h" |
28 #include "components/autofill/core/common/form_field_data.h" | 30 #include "components/autofill/core/common/form_field_data.h" |
29 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/browser/web_contents.h" | 32 #include "content/public/browser/web_contents.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const FormData& form_data, | 94 const FormData& form_data, |
93 const AutofillMetrics& metric_logger, | 95 const AutofillMetrics& metric_logger, |
94 scoped_refptr<content::MessageLoopRunner> runner, | 96 scoped_refptr<content::MessageLoopRunner> runner, |
95 const DialogType dialog_type) | 97 const DialogType dialog_type) |
96 : AutofillDialogControllerImpl(contents, | 98 : AutofillDialogControllerImpl(contents, |
97 form_data, | 99 form_data, |
98 GURL(), | 100 GURL(), |
99 dialog_type, | 101 dialog_type, |
100 base::Bind(&MockCallback)), | 102 base::Bind(&MockCallback)), |
101 metric_logger_(metric_logger), | 103 metric_logger_(metric_logger), |
| 104 mock_wallet_client_( |
| 105 Profile::FromBrowserContext(contents->GetBrowserContext())-> |
| 106 GetRequestContext(), this), |
102 message_loop_runner_(runner), | 107 message_loop_runner_(runner), |
103 use_validation_(false) {} | 108 use_validation_(false) {} |
104 | 109 |
105 virtual ~TestAutofillDialogController() {} | 110 virtual ~TestAutofillDialogController() {} |
106 | 111 |
107 virtual void ViewClosed() OVERRIDE { | 112 virtual void ViewClosed() OVERRIDE { |
108 message_loop_runner_->Quit(); | 113 message_loop_runner_->Quit(); |
109 AutofillDialogControllerImpl::ViewClosed(); | 114 AutofillDialogControllerImpl::ViewClosed(); |
110 } | 115 } |
111 | 116 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 149 } |
145 | 150 |
146 void set_notifications(const std::vector<DialogNotification>& notifications) { | 151 void set_notifications(const std::vector<DialogNotification>& notifications) { |
147 notifications_ = notifications; | 152 notifications_ = notifications; |
148 } | 153 } |
149 | 154 |
150 TestPersonalDataManager* GetTestingManager() { | 155 TestPersonalDataManager* GetTestingManager() { |
151 return &test_manager_; | 156 return &test_manager_; |
152 } | 157 } |
153 | 158 |
154 using AutofillDialogControllerImpl::DisableWallet; | |
155 using AutofillDialogControllerImpl::IsEditingExistingData; | 159 using AutofillDialogControllerImpl::IsEditingExistingData; |
156 using AutofillDialogControllerImpl::IsManuallyEditingSection; | 160 using AutofillDialogControllerImpl::IsManuallyEditingSection; |
157 | 161 |
158 void set_use_validation(bool use_validation) { | 162 void set_use_validation(bool use_validation) { |
159 use_validation_ = use_validation; | 163 use_validation_ = use_validation; |
160 } | 164 } |
161 | 165 |
162 protected: | 166 protected: |
163 virtual PersonalDataManager* GetManager() OVERRIDE { | 167 virtual PersonalDataManager* GetManager() OVERRIDE { |
164 return &test_manager_; | 168 return &test_manager_; |
165 } | 169 } |
166 | 170 |
| 171 virtual wallet::WalletClient* GetWalletClient() OVERRIDE { |
| 172 return &mock_wallet_client_; |
| 173 } |
| 174 |
167 private: | 175 private: |
168 // To specify our own metric logger. | 176 // To specify our own metric logger. |
169 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE { | 177 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE { |
170 return metric_logger_; | 178 return metric_logger_; |
171 } | 179 } |
172 | 180 |
173 const AutofillMetrics& metric_logger_; | 181 const AutofillMetrics& metric_logger_; |
174 TestPersonalDataManager test_manager_; | 182 TestPersonalDataManager test_manager_; |
| 183 testing::NiceMock<wallet::MockWalletClient> mock_wallet_client_; |
175 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 184 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
176 bool use_validation_; | 185 bool use_validation_; |
177 | 186 |
178 // A list of notifications to show in the notification area of the dialog. | 187 // A list of notifications to show in the notification area of the dialog. |
179 // This is used to control what |CurrentNotifications()| returns for testing. | 188 // This is used to control what |CurrentNotifications()| returns for testing. |
180 std::vector<DialogNotification> notifications_; | 189 std::vector<DialogNotification> notifications_; |
181 | 190 |
182 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogController); | 191 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogController); |
183 }; | 192 }; |
184 | 193 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 #if defined(OS_MACOSX) | 424 #if defined(OS_MACOSX) |
416 // TODO(groby): Implement the necessary functionality and enable this test: | 425 // TODO(groby): Implement the necessary functionality and enable this test: |
417 // http://crbug.com/256864 | 426 // http://crbug.com/256864 |
418 #define MAYBE_FillInputFromAutofill DISABLED_FillInputFromAutofill | 427 #define MAYBE_FillInputFromAutofill DISABLED_FillInputFromAutofill |
419 #else | 428 #else |
420 #define MAYBE_FillInputFromAutofill FillInputFromAutofill | 429 #define MAYBE_FillInputFromAutofill FillInputFromAutofill |
421 #endif | 430 #endif |
422 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, | 431 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, |
423 MAYBE_FillInputFromAutofill) { | 432 MAYBE_FillInputFromAutofill) { |
424 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); | 433 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); |
425 controller()->DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); | |
426 | 434 |
427 AutofillProfile full_profile(test::GetFullProfile()); | 435 AutofillProfile full_profile(test::GetFullProfile()); |
428 controller()->GetTestingManager()->AddTestingProfile(&full_profile); | 436 controller()->GetTestingManager()->AddTestingProfile(&full_profile); |
429 | 437 |
430 const DetailInputs& inputs = | 438 const DetailInputs& inputs = |
431 controller()->RequestedFieldsForSection(SECTION_SHIPPING); | 439 controller()->RequestedFieldsForSection(SECTION_SHIPPING); |
432 const DetailInput& triggering_input = inputs[0]; | 440 const DetailInput& triggering_input = inputs[0]; |
433 string16 value = full_profile.GetRawInfo(triggering_input.type); | 441 string16 value = full_profile.GetRawInfo(triggering_input.type); |
434 TestableAutofillDialogView* view = controller()->GetTestableView(); | 442 TestableAutofillDialogView* view = controller()->GetTestableView(); |
435 view->SetTextContentsOfInput(triggering_input, | 443 view->SetTextContentsOfInput(triggering_input, |
(...skipping 29 matching lines...) Expand all Loading... |
465 ASSERT_EQ(&triggering_input, controller()->input_showing_popup()); | 473 ASSERT_EQ(&triggering_input, controller()->input_showing_popup()); |
466 controller()->DidAcceptSuggestion(string16(), 0); | 474 controller()->DidAcceptSuggestion(string16(), 0); |
467 | 475 |
468 for (size_t i = 0; i < inputs.size(); ++i) { | 476 for (size_t i = 0; i < inputs.size(); ++i) { |
469 EXPECT_EQ(expectations[i], view->GetTextContentsOfInput(inputs[i])); | 477 EXPECT_EQ(expectations[i], view->GetTextContentsOfInput(inputs[i])); |
470 } | 478 } |
471 } | 479 } |
472 | 480 |
473 // Test that Autocheckout steps are shown after submitting the | 481 // Test that Autocheckout steps are shown after submitting the |
474 // dialog for controller with type DIALOG_TYPE_AUTOCHECKOUT. | 482 // dialog for controller with type DIALOG_TYPE_AUTOCHECKOUT. |
475 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, | 483 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, AutocheckoutShowsSteps) { |
476 DISABLED_AutocheckoutShowsSteps) { | |
477 InitializeControllerOfType(DIALOG_TYPE_AUTOCHECKOUT); | 484 InitializeControllerOfType(DIALOG_TYPE_AUTOCHECKOUT); |
478 controller()->AddAutocheckoutStep(AUTOCHECKOUT_STEP_PROXY_CARD); | 485 controller()->AddAutocheckoutStep(AUTOCHECKOUT_STEP_PROXY_CARD); |
479 | 486 |
480 EXPECT_TRUE(controller()->ShouldShowDetailArea()); | 487 EXPECT_TRUE(controller()->ShouldShowDetailArea()); |
481 EXPECT_TRUE(controller()->CurrentAutocheckoutSteps().empty()); | 488 EXPECT_TRUE(controller()->CurrentAutocheckoutSteps().empty()); |
482 EXPECT_FALSE(controller()->ShouldShowProgressBar()); | 489 EXPECT_FALSE(controller()->ShouldShowProgressBar()); |
483 | 490 |
484 controller()->GetTestableView()->SubmitForTesting(); | 491 controller()->GetTestableView()->SubmitForTesting(); |
485 EXPECT_FALSE(controller()->ShouldShowDetailArea()); | 492 EXPECT_FALSE(controller()->ShouldShowDetailArea()); |
486 EXPECT_FALSE(controller()->CurrentAutocheckoutSteps().empty()); | 493 EXPECT_FALSE(controller()->CurrentAutocheckoutSteps().empty()); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 // http://crbug.com/256864 | 525 // http://crbug.com/256864 |
519 #define MAYBE_FillComboboxFromAutofill DISABLED_FillComboboxFromAutofill | 526 #define MAYBE_FillComboboxFromAutofill DISABLED_FillComboboxFromAutofill |
520 #else | 527 #else |
521 #define MAYBE_FillComboboxFromAutofill FillComboboxFromAutofill | 528 #define MAYBE_FillComboboxFromAutofill FillComboboxFromAutofill |
522 #endif | 529 #endif |
523 // Tests that changing the value of a CC expiration date combobox works as | 530 // Tests that changing the value of a CC expiration date combobox works as |
524 // expected when Autofill is used to fill text inputs. | 531 // expected when Autofill is used to fill text inputs. |
525 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, | 532 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, |
526 MAYBE_FillComboboxFromAutofill) { | 533 MAYBE_FillComboboxFromAutofill) { |
527 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); | 534 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); |
528 controller()->DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); | |
529 | 535 |
530 CreditCard card1; | 536 CreditCard card1; |
531 test::SetCreditCardInfo(&card1, "JJ Smith", "4111111111111111", "12", "2018"); | 537 test::SetCreditCardInfo(&card1, "JJ Smith", "4111111111111111", "12", "2018"); |
532 controller()->GetTestingManager()->AddTestingCreditCard(&card1); | 538 controller()->GetTestingManager()->AddTestingCreditCard(&card1); |
533 CreditCard card2; | 539 CreditCard card2; |
534 test::SetCreditCardInfo(&card2, "B Bird", "3111111111111111", "11", "2017"); | 540 test::SetCreditCardInfo(&card2, "B Bird", "3111111111111111", "11", "2017"); |
535 controller()->GetTestingManager()->AddTestingCreditCard(&card2); | 541 controller()->GetTestingManager()->AddTestingCreditCard(&card2); |
536 AutofillProfile full_profile(test::GetFullProfile()); | 542 AutofillProfile full_profile(test::GetFullProfile()); |
537 controller()->GetTestingManager()->AddTestingProfile(&full_profile); | 543 controller()->GetTestingManager()->AddTestingProfile(&full_profile); |
538 | 544 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 EXPECT_TRUE(add_inputs[i].editable); | 648 EXPECT_TRUE(add_inputs[i].editable); |
643 break; | 649 break; |
644 } | 650 } |
645 } | 651 } |
646 ASSERT_LT(i, add_inputs.size()); | 652 ASSERT_LT(i, add_inputs.size()); |
647 } | 653 } |
648 | 654 |
649 // Ensure that expired cards trigger invalid suggestions. | 655 // Ensure that expired cards trigger invalid suggestions. |
650 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, ExpiredCard) { | 656 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, ExpiredCard) { |
651 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); | 657 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); |
652 controller()->DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); | |
653 | 658 |
654 CreditCard verified_card(test::GetCreditCard()); | 659 CreditCard verified_card(test::GetCreditCard()); |
655 verified_card.set_origin("Chrome settings"); | 660 verified_card.set_origin("Chrome settings"); |
656 ASSERT_TRUE(verified_card.IsVerified()); | 661 ASSERT_TRUE(verified_card.IsVerified()); |
657 controller()->GetTestingManager()->AddTestingCreditCard(&verified_card); | 662 controller()->GetTestingManager()->AddTestingCreditCard(&verified_card); |
658 | 663 |
659 CreditCard expired_card(test::GetCreditCard()); | 664 CreditCard expired_card(test::GetCreditCard()); |
660 expired_card.set_origin("Chrome settings"); | 665 expired_card.set_origin("Chrome settings"); |
661 expired_card.SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, ASCIIToUTF16("2007")); | 666 expired_card.SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, ASCIIToUTF16("2007")); |
662 ASSERT_TRUE(expired_card.IsVerified()); | 667 ASSERT_TRUE(expired_card.IsVerified()); |
663 ASSERT_FALSE( | 668 ASSERT_FALSE( |
664 autofill::IsValidCreditCardExpirationDate( | 669 autofill::IsValidCreditCardExpirationDate( |
665 expired_card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR), | 670 expired_card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR), |
666 expired_card.GetRawInfo(CREDIT_CARD_EXP_MONTH), | 671 expired_card.GetRawInfo(CREDIT_CARD_EXP_MONTH), |
667 base::Time::Now())); | 672 base::Time::Now())); |
668 controller()->GetTestingManager()->AddTestingCreditCard(&expired_card); | 673 controller()->GetTestingManager()->AddTestingCreditCard(&expired_card); |
669 | 674 |
670 ui::MenuModel* model = controller()->MenuModelForSection(SECTION_CC); | 675 ui::MenuModel* model = controller()->MenuModelForSection(SECTION_CC); |
671 ASSERT_EQ(4, model->GetItemCount()); | 676 ASSERT_EQ(4, model->GetItemCount()); |
672 | 677 |
673 ASSERT_TRUE(model->IsItemCheckedAt(0)); | 678 ASSERT_TRUE(model->IsItemCheckedAt(0)); |
674 EXPECT_FALSE(controller()->IsEditingExistingData(SECTION_CC)); | 679 EXPECT_FALSE(controller()->IsEditingExistingData(SECTION_CC)); |
675 | 680 |
676 model->ActivatedAt(1); | 681 model->ActivatedAt(1); |
677 ASSERT_TRUE(model->IsItemCheckedAt(1)); | 682 ASSERT_TRUE(model->IsItemCheckedAt(1)); |
678 EXPECT_TRUE(controller()->IsEditingExistingData(SECTION_CC)); | 683 EXPECT_TRUE(controller()->IsEditingExistingData(SECTION_CC)); |
679 } | 684 } |
680 | 685 |
681 // Notifications with long message text should not make the dialog bigger. | 686 // Notifications with long message text should not make the dialog bigger. |
682 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, | 687 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, LongNotifications) { |
683 DISABLED_LongNotifications) { | |
684 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); | 688 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); |
685 | 689 |
686 const gfx::Size no_notification_size = | 690 const gfx::Size no_notification_size = |
687 controller()->GetTestableView()->GetSize(); | 691 controller()->GetTestableView()->GetSize(); |
688 ASSERT_GT(no_notification_size.width(), 0); | 692 ASSERT_GT(no_notification_size.width(), 0); |
689 | 693 |
690 std::vector<DialogNotification> notifications; | 694 std::vector<DialogNotification> notifications; |
691 notifications.push_back( | 695 notifications.push_back( |
692 DialogNotification(DialogNotification::DEVELOPER_WARNING, ASCIIToUTF16( | 696 DialogNotification(DialogNotification::DEVELOPER_WARNING, ASCIIToUTF16( |
693 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " | 697 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 #endif | 768 #endif |
765 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, | 769 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, |
766 MAYBE_AutocompleteErrorEventReasonCancel) { | 770 MAYBE_AutocompleteErrorEventReasonCancel) { |
767 SetUpHtmlAndInvoke("<input autocomplete='cc-name'>")->GetTestableView()-> | 771 SetUpHtmlAndInvoke("<input autocomplete='cc-name'>")->GetTestableView()-> |
768 CancelForTesting(); | 772 CancelForTesting(); |
769 ExpectDomMessage("error: cancel"); | 773 ExpectDomMessage("error: cancel"); |
770 } | 774 } |
771 | 775 |
772 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, NoCvcSegfault) { | 776 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, NoCvcSegfault) { |
773 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); | 777 InitializeControllerOfType(DIALOG_TYPE_REQUEST_AUTOCOMPLETE); |
774 controller()->DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); | |
775 controller()->set_use_validation(true); | 778 controller()->set_use_validation(true); |
776 | 779 |
777 CreditCard credit_card(test::GetVerifiedCreditCard()); | 780 CreditCard credit_card(test::GetVerifiedCreditCard()); |
778 controller()->GetTestingManager()->AddTestingCreditCard(&credit_card); | 781 controller()->GetTestingManager()->AddTestingCreditCard(&credit_card); |
779 EXPECT_FALSE(controller()->IsEditingExistingData(SECTION_CC)); | 782 EXPECT_FALSE(controller()->IsEditingExistingData(SECTION_CC)); |
780 | 783 |
781 ASSERT_NO_FATAL_FAILURE( | 784 ASSERT_NO_FATAL_FAILURE( |
782 controller()->GetTestableView()->SubmitForTesting()); | 785 controller()->GetTestableView()->SubmitForTesting()); |
783 } | 786 } |
784 | 787 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 EXPECT_EQ(cc_number.type, new_cc_number.type); | 867 EXPECT_EQ(cc_number.type, new_cc_number.type); |
865 EXPECT_EQ(ASCIIToUTF16("4111111111111111"), | 868 EXPECT_EQ(ASCIIToUTF16("4111111111111111"), |
866 view->GetTextContentsOfInput(new_cc_number)); | 869 view->GetTextContentsOfInput(new_cc_number)); |
867 | 870 |
868 EXPECT_NE(ASCIIToUTF16("shipping name"), | 871 EXPECT_NE(ASCIIToUTF16("shipping name"), |
869 view->GetTextContentsOfInput(shipping_zip)); | 872 view->GetTextContentsOfInput(shipping_zip)); |
870 } | 873 } |
871 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) | 874 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) |
872 | 875 |
873 } // namespace autofill | 876 } // namespace autofill |
OLD | NEW |