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

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

Issue 10073018: Add Delete Support to New Autofill UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
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/autocomplete_history_manager.h" 10 #include "chrome/browser/autocomplete_history_manager.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 class MockAutofillExternalDelegate : public TestAutofillExternalDelegate { 141 class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
142 public: 142 public:
143 explicit MockAutofillExternalDelegate(TabContentsWrapper* wrapper) 143 explicit MockAutofillExternalDelegate(TabContentsWrapper* wrapper)
144 : TestAutofillExternalDelegate(wrapper, NULL) {} 144 : TestAutofillExternalDelegate(wrapper, NULL) {}
145 virtual ~MockAutofillExternalDelegate() {} 145 virtual ~MockAutofillExternalDelegate() {}
146 146
147 virtual void ApplyAutofillSuggestions( 147 virtual void ApplyAutofillSuggestions(
148 const std::vector<string16>& autofill_values, 148 const std::vector<string16>& autofill_values,
149 const std::vector<string16>& autofill_labels, 149 const std::vector<string16>& autofill_labels,
150 const std::vector<string16>& autofill_icons, 150 const std::vector<string16>& autofill_icons,
151 const std::vector<int>& autofill_unique_ids, 151 const std::vector<int>& autofill_unique_ids) OVERRIDE {};
152 int separator_index) OVERRIDE {};
153 152
154 MOCK_METHOD5(OnSuggestionsReturned, 153 MOCK_METHOD5(OnSuggestionsReturned,
155 void(int query_id, 154 void(int query_id,
156 const std::vector<string16>& autofill_values, 155 const std::vector<string16>& autofill_values,
157 const std::vector<string16>& autofill_labels, 156 const std::vector<string16>& autofill_labels,
158 const std::vector<string16>& autofill_icons, 157 const std::vector<string16>& autofill_icons,
159 const std::vector<int>& autofill_unique_ids)); 158 const std::vector<int>& autofill_unique_ids));
160 159
161 private: 160 private:
162 DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate); 161 DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate);
(...skipping 20 matching lines...) Expand all
183 &profile_, web_data_service_); 182 &profile_, web_data_service_);
184 183
185 MockAutofillExternalDelegate external_delegate( 184 MockAutofillExternalDelegate external_delegate(
186 TabContentsWrapper::GetCurrentWrapperForContents(contents())); 185 TabContentsWrapper::GetCurrentWrapperForContents(contents()));
187 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); 186 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _));
188 autocomplete_history_manager.SetExternalDelegate(&external_delegate); 187 autocomplete_history_manager.SetExternalDelegate(&external_delegate);
189 188
190 // Should trigger a call to OnSuggestionsReturned, verified by the mock. 189 // Should trigger a call to OnSuggestionsReturned, verified by the mock.
191 autocomplete_history_manager.SendSuggestions(NULL); 190 autocomplete_history_manager.SendSuggestions(NULL);
192 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698