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

Side by Side Diff: chrome/browser/autofill/autocomplete_history_manager_unittest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autofill/autocomplete_history_manager.h" 10 #include "chrome/browser/autofill/autocomplete_history_manager.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager { 173 class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager {
174 public: 174 public:
175 explicit AutocompleteHistoryManagerStubSend( 175 explicit AutocompleteHistoryManagerStubSend(
176 WebContents* web_contents, 176 WebContents* web_contents,
177 Profile* profile, 177 Profile* profile,
178 scoped_ptr<AutofillWebDataService> wds) 178 scoped_ptr<AutofillWebDataService> wds)
179 : AutocompleteHistoryManager(web_contents, profile, wds.Pass()) {} 179 : AutocompleteHistoryManager(web_contents, profile, wds.Pass()) {}
180 180
181 // Intentionally swallow the message. 181 // Intentionally swallow the message.
182 virtual bool Send(IPC::Message* message) { delete message; return true; } 182 virtual bool Send(IPC::Message* message) OVERRIDE {
183 delete message;
Nico 2013/02/06 22:22:58 Out of curiosity, did you rewrap manually or is th
Ryan Sleevi 2013/02/06 22:29:07 Both, depending. In the original 751 file CL, the
184 return true;
185 }
183 }; 186 };
184 187
185 } // namespace 188 } // namespace
186 189
187 // Make sure our external delegate is called at the right time. 190 // Make sure our external delegate is called at the right time.
188 TEST_F(AutocompleteHistoryManagerTest, ExternalDelegate) { 191 TEST_F(AutocompleteHistoryManagerTest, ExternalDelegate) {
189 // Local version with a stubbed out Send() 192 // Local version with a stubbed out Send()
190 AutocompleteHistoryManagerStubSend autocomplete_history_manager( 193 AutocompleteHistoryManagerStubSend autocomplete_history_manager(
191 web_contents(), 194 web_contents(),
192 &profile_, 195 &profile_,
193 scoped_ptr<AutofillWebDataService>( 196 scoped_ptr<AutofillWebDataService>(
194 new AutofillWebDataServiceImpl(web_data_service_))); 197 new AutofillWebDataServiceImpl(web_data_service_)));
195 198
196 MockAutofillExternalDelegate external_delegate(web_contents()); 199 MockAutofillExternalDelegate external_delegate(web_contents());
197 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); 200 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _));
198 autocomplete_history_manager.SetExternalDelegate(&external_delegate); 201 autocomplete_history_manager.SetExternalDelegate(&external_delegate);
199 202
200 // Should trigger a call to OnSuggestionsReturned, verified by the mock. 203 // Should trigger a call to OnSuggestionsReturned, verified by the mock.
201 autocomplete_history_manager.SendSuggestions(NULL); 204 autocomplete_history_manager.SendSuggestions(NULL);
202 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider_unittest.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698