| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 using base::ASCIIToUTF16; | 76 using base::ASCIIToUTF16; |
| 77 | 77 |
| 78 namespace autofill { | 78 namespace autofill { |
| 79 | 79 |
| 80 namespace { | 80 namespace { |
| 81 | 81 |
| 82 using testing::Return; | 82 using testing::Return; |
| 83 using testing::_; | 83 using testing::_; |
| 84 using ::i18n::addressinput::AddressValidator; | 84 using ::i18n::addressinput::AddressValidator; |
| 85 | 85 |
| 86 void MockCallback(const FormStructure*) {} | 86 void MockCallback(AutofillManagerDelegate::RequestAutocompleteResult, |
| 87 const FormStructure*) {} |
| 87 | 88 |
| 88 class MockAutofillMetrics : public AutofillMetrics { | 89 class MockAutofillMetrics : public AutofillMetrics { |
| 89 public: | 90 public: |
| 90 MockAutofillMetrics() | 91 MockAutofillMetrics() |
| 91 : dialog_dismissal_action_(static_cast<DialogDismissalAction>(-1)) {} | 92 : dialog_dismissal_action_(static_cast<DialogDismissalAction>(-1)) {} |
| 92 virtual ~MockAutofillMetrics() {} | 93 virtual ~MockAutofillMetrics() {} |
| 93 | 94 |
| 94 virtual void LogDialogUiDuration( | 95 virtual void LogDialogUiDuration( |
| 95 const base::TimeDelta& duration, | 96 const base::TimeDelta& duration, |
| 96 DialogDismissalAction dismissal_action) const OVERRIDE { | 97 DialogDismissalAction dismissal_action) const OVERRIDE { |
| (...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1706 // Relevant country loaded but revalidation already happened, no further | 1707 // Relevant country loaded but revalidation already happened, no further |
| 1707 // validation should occur. | 1708 // validation should occur. |
| 1708 controller()->OnAddressValidationRulesLoaded("DE", false); | 1709 controller()->OnAddressValidationRulesLoaded("DE", false); |
| 1709 | 1710 |
| 1710 // Cancelling the dialog causes additional validation to see if the user | 1711 // Cancelling the dialog causes additional validation to see if the user |
| 1711 // cancelled with invalid fields, so verify and clear here. | 1712 // cancelled with invalid fields, so verify and clear here. |
| 1712 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator()); | 1713 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator()); |
| 1713 } | 1714 } |
| 1714 | 1715 |
| 1715 } // namespace autofill | 1716 } // namespace autofill |
| OLD | NEW |