Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: components/autofill/browser/autocomplete_history_manager_unittest.cc

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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");

Powered by Google App Engine
This is Rietveld 408576698