| 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/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 virtual ValidityData InputsAreValid( | 133 virtual ValidityData InputsAreValid( |
| 134 DialogSection section, | 134 DialogSection section, |
| 135 const DetailOutputMap& inputs, | 135 const DetailOutputMap& inputs, |
| 136 ValidationType validation_type) OVERRIDE { | 136 ValidationType validation_type) OVERRIDE { |
| 137 if (!use_validation_) | 137 if (!use_validation_) |
| 138 return ValidityData(); | 138 return ValidityData(); |
| 139 return AutofillDialogControllerImpl::InputsAreValid( | 139 return AutofillDialogControllerImpl::InputsAreValid( |
| 140 section, inputs, validation_type); | 140 section, inputs, validation_type); |
| 141 } | 141 } |
| 142 | 142 |
| 143 // Saving to Chrome is tested in AutofillDialogController unit tests. | 143 // Saving to Chrome is tested in AutofillDialogControllerImpl unit tests. |
| 144 // TODO(estade): test that the view defaults to saving to Chrome. | 144 // TODO(estade): test that the view defaults to saving to Chrome. |
| 145 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE { | 145 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE { |
| 146 return false; | 146 return false; |
| 147 } | 147 } |
| 148 | 148 |
| 149 // Increase visibility for testing. | 149 // Increase visibility for testing. |
| 150 using AutofillDialogControllerImpl::view; | 150 using AutofillDialogControllerImpl::view; |
| 151 using AutofillDialogControllerImpl::input_showing_popup; | 151 using AutofillDialogControllerImpl::input_showing_popup; |
| 152 | 152 |
| 153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE { | 153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE { |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 EXPECT_EQ(cc_number.type, new_cc_number.type); | 868 EXPECT_EQ(cc_number.type, new_cc_number.type); |
| 869 EXPECT_EQ(ASCIIToUTF16("4111111111111111"), | 869 EXPECT_EQ(ASCIIToUTF16("4111111111111111"), |
| 870 view->GetTextContentsOfInput(new_cc_number)); | 870 view->GetTextContentsOfInput(new_cc_number)); |
| 871 | 871 |
| 872 EXPECT_NE(ASCIIToUTF16("shipping name"), | 872 EXPECT_NE(ASCIIToUTF16("shipping name"), |
| 873 view->GetTextContentsOfInput(shipping_zip)); | 873 view->GetTextContentsOfInput(shipping_zip)); |
| 874 } | 874 } |
| 875 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) | 875 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) |
| 876 | 876 |
| 877 } // namespace autofill | 877 } // namespace autofill |
| OLD | NEW |