| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 FormData form; | 348 FormData form; |
| 349 form.name = ASCIIToUTF16("TestForm"); | 349 form.name = ASCIIToUTF16("TestForm"); |
| 350 form.method = ASCIIToUTF16("POST"); | 350 form.method = ASCIIToUTF16("POST"); |
| 351 form.user_submitted = true; | 351 form.user_submitted = true; |
| 352 | 352 |
| 353 FormFieldData field; | 353 FormFieldData field; |
| 354 field.autocomplete_attribute = "shipping tel"; | 354 field.autocomplete_attribute = "shipping tel"; |
| 355 form.fields.push_back(field); | 355 form.fields.push_back(field); |
| 356 | 356 |
| 357 FormFieldData cc; |
| 358 cc.autocomplete_attribute = "cc-number"; |
| 359 form.fields.push_back(cc); |
| 360 |
| 357 test_generated_bubble_controller_ = | 361 test_generated_bubble_controller_ = |
| 358 new testing::NiceMock<TestGeneratedCreditCardBubbleController>( | 362 new testing::NiceMock<TestGeneratedCreditCardBubbleController>( |
| 359 GetActiveWebContents()); | 363 GetActiveWebContents()); |
| 360 ASSERT_TRUE(test_generated_bubble_controller_->IsInstalled()); | 364 ASSERT_TRUE(test_generated_bubble_controller_->IsInstalled()); |
| 361 | 365 |
| 362 message_loop_runner_ = new content::MessageLoopRunner; | 366 message_loop_runner_ = new content::MessageLoopRunner; |
| 363 controller_ = new TestAutofillDialogController( | 367 controller_ = new TestAutofillDialogController( |
| 364 GetActiveWebContents(), | 368 GetActiveWebContents(), |
| 365 form, | 369 form, |
| 366 metric_logger_, | 370 metric_logger_, |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1729 // Relevant country loaded but revalidation already happened, no further | 1733 // Relevant country loaded but revalidation already happened, no further |
| 1730 // validation should occur. | 1734 // validation should occur. |
| 1731 controller()->OnAddressValidationRulesLoaded("DE", false); | 1735 controller()->OnAddressValidationRulesLoaded("DE", false); |
| 1732 | 1736 |
| 1733 // Cancelling the dialog causes additional validation to see if the user | 1737 // Cancelling the dialog causes additional validation to see if the user |
| 1734 // cancelled with invalid fields, so verify and clear here. | 1738 // cancelled with invalid fields, so verify and clear here. |
| 1735 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator()); | 1739 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator()); |
| 1736 } | 1740 } |
| 1737 | 1741 |
| 1738 } // namespace autofill | 1742 } // namespace autofill |
| OLD | NEW |