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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" | 9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
10 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 10 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace autofill { | 37 namespace autofill { |
38 namespace { | 38 namespace { |
39 | 39 |
40 class MockAutofillExternalDelegate : public AutofillExternalDelegate { | 40 class MockAutofillExternalDelegate : public AutofillExternalDelegate { |
41 public: | 41 public: |
42 MockAutofillExternalDelegate(AutofillManager* autofill_manager, | 42 MockAutofillExternalDelegate(AutofillManager* autofill_manager, |
43 AutofillDriver* autofill_driver) | 43 AutofillDriver* autofill_driver) |
44 : AutofillExternalDelegate(autofill_manager, autofill_driver) {} | 44 : AutofillExternalDelegate(autofill_manager, autofill_driver) {} |
45 virtual ~MockAutofillExternalDelegate() {} | 45 virtual ~MockAutofillExternalDelegate() {} |
46 | 46 |
47 virtual void DidSelectSuggestion(int identifier) OVERRIDE {} | 47 virtual void DidSelectSuggestion(int identifier, |
| 48 const base::string16& value) OVERRIDE {} |
48 virtual void RemoveSuggestion(const base::string16& value, | 49 virtual void RemoveSuggestion(const base::string16& value, |
49 int identifier) OVERRIDE {} | 50 int identifier) OVERRIDE {} |
50 virtual void ClearPreviewedForm() OVERRIDE {} | 51 virtual void ClearPreviewedForm() OVERRIDE {} |
51 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() { | 52 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() { |
52 return AutofillExternalDelegate::GetWeakPtr(); | 53 return AutofillExternalDelegate::GetWeakPtr(); |
53 } | 54 } |
54 }; | 55 }; |
55 | 56 |
56 class MockAutofillManagerDelegate | 57 class MockAutofillManagerDelegate |
57 : public autofill::TestAutofillManagerDelegate { | 58 : public autofill::TestAutofillManagerDelegate { |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]); | 531 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]); |
531 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]); | 532 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]); |
532 | 533 |
533 // The second element was shorter so it should be unchanged. | 534 // The second element was shorter so it should be unchanged. |
534 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]); | 535 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]); |
535 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]); | 536 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]); |
536 } | 537 } |
537 #endif | 538 #endif |
538 | 539 |
539 } // namespace autofill | 540 } // namespace autofill |
OLD | NEW |