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 "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" | 5 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" |
6 #include "content/public/browser/native_web_keyboard_event.h" // For gmock. | 6 #include "content/public/browser/native_web_keyboard_event.h" // For gmock. |
7 #include "grit/generated_resources.h" | 7 #include "grit/generated_resources.h" |
8 #include "ui/base/l10n/l10n_util.h" | 8 #include "ui/base/l10n/l10n_util.h" |
9 #include "ui/gfx/rect.h" // Only needed because gmock needs complete types. | 9 #include "ui/gfx/rect.h" // Only needed because gmock needs complete types. |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 base::string16(), | 32 base::string16(), |
33 gfx::Image())); | 33 gfx::Image())); |
34 DefaultValue<FieldIconMap>::Set(FieldIconMap()); | 34 DefaultValue<FieldIconMap>::Set(FieldIconMap()); |
35 DefaultValue<std::vector<DialogNotification> >::Set( | 35 DefaultValue<std::vector<DialogNotification> >::Set( |
36 std::vector<DialogNotification>()); | 36 std::vector<DialogNotification>()); |
37 | 37 |
38 // SECTION_CC *must* have a CREDIT_CARD_VERIFICATION_CODE field. | 38 // SECTION_CC *must* have a CREDIT_CARD_VERIFICATION_CODE field. |
39 const DetailInput kCreditCardInputs[] = { | 39 const DetailInput kCreditCardInputs[] = { |
40 { DetailInput::SHORT, | 40 { DetailInput::SHORT, |
41 CREDIT_CARD_VERIFICATION_CODE, | 41 CREDIT_CARD_VERIFICATION_CODE, |
42 IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC } | 42 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC) } |
43 }; | 43 }; |
44 cc_default_inputs_.push_back(kCreditCardInputs[0]); | 44 cc_default_inputs_.push_back(kCreditCardInputs[0]); |
45 ON_CALL(*this, RequestedFieldsForSection(SECTION_CC)) | 45 ON_CALL(*this, RequestedFieldsForSection(SECTION_CC)) |
46 .WillByDefault(ReturnRef(cc_default_inputs_)); | 46 .WillByDefault(ReturnRef(cc_default_inputs_)); |
47 ON_CALL(*this, RequestedFieldsForSection(SECTION_CC_BILLING)) | 47 ON_CALL(*this, RequestedFieldsForSection(SECTION_CC_BILLING)) |
48 .WillByDefault(ReturnRef(cc_default_inputs_)); | 48 .WillByDefault(ReturnRef(cc_default_inputs_)); |
49 | 49 |
50 ON_CALL(*this, GetDialogButtons()) | 50 ON_CALL(*this, GetDialogButtons()) |
51 .WillByDefault(Return(ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL)); | 51 .WillByDefault(Return(ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL)); |
52 ON_CALL(*this, LegalDocumentLinks()).WillByDefault(ReturnRef(range_)); | 52 ON_CALL(*this, LegalDocumentLinks()).WillByDefault(ReturnRef(range_)); |
(...skipping 23 matching lines...) Expand all Loading... |
76 DefaultValue<base::string16>::Clear(); | 76 DefaultValue<base::string16>::Clear(); |
77 DefaultValue<GURL>::Clear(); | 77 DefaultValue<GURL>::Clear(); |
78 DefaultValue<const DetailInputs&>::Clear(); | 78 DefaultValue<const DetailInputs&>::Clear(); |
79 DefaultValue<FieldIconMap>::Clear(); | 79 DefaultValue<FieldIconMap>::Clear(); |
80 DefaultValue<std::vector<DialogNotification> >::Clear(); | 80 DefaultValue<std::vector<DialogNotification> >::Clear(); |
81 DefaultValue<content::WebContents*>::Clear(); | 81 DefaultValue<content::WebContents*>::Clear(); |
82 DefaultValue<Profile*>::Clear(); | 82 DefaultValue<Profile*>::Clear(); |
83 } | 83 } |
84 | 84 |
85 } // namespace autofill | 85 } // namespace autofill |
OLD | NEW |