| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 3672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3683 #if defined(OS_ANDROID) | 3683 #if defined(OS_ANDROID) |
| 3684 #define MAYBE_ImportFormDataCreditCardHTTP DISABLED_ImportFormDataCreditCardHTTP | 3684 #define MAYBE_ImportFormDataCreditCardHTTP DISABLED_ImportFormDataCreditCardHTTP |
| 3685 #else | 3685 #else |
| 3686 #define MAYBE_ImportFormDataCreditCardHTTP ImportFormDataCreditCardHTTP | 3686 #define MAYBE_ImportFormDataCreditCardHTTP ImportFormDataCreditCardHTTP |
| 3687 #endif | 3687 #endif |
| 3688 TEST_F(AutofillManagerTest, MAYBE_ImportFormDataCreditCardHTTP) { | 3688 TEST_F(AutofillManagerTest, MAYBE_ImportFormDataCreditCardHTTP) { |
| 3689 TestSaveCreditCards(false); | 3689 TestSaveCreditCards(false); |
| 3690 } | 3690 } |
| 3691 | 3691 |
| 3692 // Tests that credit card data are saved when autocomplete=off for CC field. | 3692 // Tests that credit card data are saved when autocomplete=off for CC field. |
| 3693 TEST_F(AutofillManagerTest, CreditCardSavedWhenAutocompleteOff) { | 3693 // TODO(crbug.com/666704): Flaky on android_n5x_swarming_rel bot. |
| 3694 #if defined(OS_ANDROID) |
| 3695 #define MAYBE_CreditCardSavedWhenAutocompleteOff \ |
| 3696 DISABLED_CreditCardSavedWhenAutocompleteOff |
| 3697 #else |
| 3698 #define MAYBE_CreditCardSavedWhenAutocompleteOff \ |
| 3699 CreditCardSavedWhenAutocompleteOff |
| 3700 #endif |
| 3701 TEST_F(AutofillManagerTest, MAYBE_CreditCardSavedWhenAutocompleteOff) { |
| 3694 // Set up our form data. | 3702 // Set up our form data. |
| 3695 FormData form; | 3703 FormData form; |
| 3696 CreateTestCreditCardFormData(&form, false, false); | 3704 CreateTestCreditCardFormData(&form, false, false); |
| 3697 | 3705 |
| 3698 // Set "autocomplete=off" for cardnumber field. | 3706 // Set "autocomplete=off" for cardnumber field. |
| 3699 form.fields[1].should_autocomplete = false; | 3707 form.fields[1].should_autocomplete = false; |
| 3700 | 3708 |
| 3701 std::vector<FormData> forms(1, form); | 3709 std::vector<FormData> forms(1, form); |
| 3702 FormsSeen(forms); | 3710 FormsSeen(forms); |
| 3703 | 3711 |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5545 | 5553 |
| 5546 // The driver should always be notified. | 5554 // The driver should always be notified. |
| 5547 for (const FormFieldData& field : form.fields) { | 5555 for (const FormFieldData& field : form.fields) { |
| 5548 GetAutofillSuggestions(form, field); | 5556 GetAutofillSuggestions(form, field); |
| 5549 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); | 5557 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); |
| 5550 autofill_driver_->ClearDidInteractWithCreditCardForm(); | 5558 autofill_driver_->ClearDidInteractWithCreditCardForm(); |
| 5551 } | 5559 } |
| 5552 } | 5560 } |
| 5553 | 5561 |
| 5554 } // namespace autofill | 5562 } // namespace autofill |
| OLD | NEW |