| Index: components/autofill/browser/autocomplete_history_manager_unittest.cc
|
| diff --git a/components/autofill/browser/autocomplete_history_manager_unittest.cc b/components/autofill/browser/autocomplete_history_manager_unittest.cc
|
| index 8567221fa8ab12cb154bc989dc97a3253cb35466..ac66c0b2253d8cdadfb53c1281f2974f99346ec2 100644
|
| --- a/components/autofill/browser/autocomplete_history_manager_unittest.cc
|
| +++ b/components/autofill/browser/autocomplete_history_manager_unittest.cc
|
| @@ -103,7 +103,11 @@ class AutocompleteHistoryManagerTest : public ChromeRenderViewHostTestHarness {
|
| web_data_service_ = new MockWebDataService();
|
| WebDataServiceFactory::GetInstance()->SetTestingFactory(
|
| profile(), MockWebDataServiceWrapperCurrent::Build);
|
| - autocomplete_manager_.reset(new AutocompleteHistoryManager(web_contents()));
|
| + autocomplete_manager_.reset(
|
| + new AutocompleteHistoryManager(
|
| + web_contents(),
|
| + WebDataServiceFactory::GetAutofillWebDataServiceForProfile(
|
| + profile())));
|
| }
|
|
|
| virtual void TearDown() OVERRIDE {
|
| @@ -228,8 +232,12 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
|
|
|
| class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager {
|
| public:
|
| - explicit AutocompleteHistoryManagerStubSend(WebContents* web_contents)
|
| - : AutocompleteHistoryManager(web_contents) {}
|
| + explicit AutocompleteHistoryManagerStubSend(WebContents* web_contents,
|
| + TestingProfile* profile)
|
| + : AutocompleteHistoryManager(
|
| + web_contents,
|
| + WebDataServiceFactory::GetAutofillWebDataServiceForProfile(profile)) {
|
| + }
|
|
|
| // Increase visibility for testing.
|
| void SendSuggestions(const std::vector<base::string16>* suggestions) {
|
| @@ -249,7 +257,7 @@ class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager {
|
| TEST_F(AutocompleteHistoryManagerTest, ExternalDelegate) {
|
| // Local version with a stubbed out Send()
|
| AutocompleteHistoryManagerStubSend autocomplete_history_manager(
|
| - web_contents());
|
| + web_contents(), profile());
|
|
|
| AutofillManager::CreateForWebContentsAndDelegate(
|
| web_contents(), &manager_delegate, "en-US");
|
|
|