| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 std::vector<int> > AutofillParam; | 61 std::vector<int> > AutofillParam; |
| 62 | 62 |
| 63 class TestPersonalDataManager : public PersonalDataManager { | 63 class TestPersonalDataManager : public PersonalDataManager { |
| 64 public: | 64 public: |
| 65 TestPersonalDataManager() { | 65 TestPersonalDataManager() { |
| 66 CreateTestAutofillProfiles(&web_profiles_); | 66 CreateTestAutofillProfiles(&web_profiles_); |
| 67 CreateTestCreditCards(&credit_cards_); | 67 CreateTestCreditCards(&credit_cards_); |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Factory method for keyed service. PersonalDataManager is NULL for testing. | 70 // Factory method for keyed service. PersonalDataManager is NULL for testing. |
| 71 static ProfileKeyedBase* Build(Profile* profile) { | 71 static ProfileKeyedService* Build(Profile* profile) { |
| 72 return NULL; | 72 return NULL; |
| 73 } | 73 } |
| 74 | 74 |
| 75 MOCK_METHOD1(SaveImportedProfile, void(const AutofillProfile&)); | 75 MOCK_METHOD1(SaveImportedProfile, void(const AutofillProfile&)); |
| 76 | 76 |
| 77 AutofillProfile* GetProfileWithGUID(const char* guid) { | 77 AutofillProfile* GetProfileWithGUID(const char* guid) { |
| 78 for (std::vector<AutofillProfile *>::iterator it = web_profiles_.begin(); | 78 for (std::vector<AutofillProfile *>::iterator it = web_profiles_.begin(); |
| 79 it != web_profiles_.end(); ++it) { | 79 it != web_profiles_.end(); ++it) { |
| 80 if (!(*it)->guid().compare(guid)) | 80 if (!(*it)->guid().compare(guid)) |
| 81 return *it; | 81 return *it; |
| (...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 | 2921 |
| 2922 AutofillManager* autofill_manager = contents_wrapper()->autofill_manager(); | 2922 AutofillManager* autofill_manager = contents_wrapper()->autofill_manager(); |
| 2923 EXPECT_TRUE(autofill_manager->external_delegate()); | 2923 EXPECT_TRUE(autofill_manager->external_delegate()); |
| 2924 | 2924 |
| 2925 AutocompleteHistoryManager* autocomplete_history_manager = | 2925 AutocompleteHistoryManager* autocomplete_history_manager = |
| 2926 contents_wrapper()->autocomplete_history_manager(); | 2926 contents_wrapper()->autocomplete_history_manager(); |
| 2927 EXPECT_TRUE(autocomplete_history_manager->external_delegate()); | 2927 EXPECT_TRUE(autocomplete_history_manager->external_delegate()); |
| 2928 } | 2928 } |
| 2929 | 2929 |
| 2930 #endif // OS_ANDROID | 2930 #endif // OS_ANDROID |
| OLD | NEW |