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

Side by Side Diff: components/autofill/core/browser/test_autofill_external_delegate.cc

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/test_autofill_external_delegate.h" 5 #include "components/autofill/core/browser/test_autofill_external_delegate.h"
6 6
7 #include "ui/gfx/rect.h" 7 #include "ui/gfx/rect.h"
8 8
9 namespace autofill { 9 namespace autofill {
10 10
11 void GenerateTestAutofillPopup( 11 void GenerateTestAutofillPopup(
12 AutofillExternalDelegate* autofill_external_delegate) { 12 AutofillExternalDelegate* autofill_external_delegate) {
13 int query_id = 1; 13 int query_id = 1;
14 FormData form; 14 FormData form;
15 FormFieldData field; 15 FormFieldData field;
16 field.is_focusable = true; 16 field.is_focusable = true;
17 field.should_autocomplete = true; 17 field.should_autocomplete = true;
18 gfx::RectF bounds(100.f, 100.f); 18 gfx::RectF bounds(100.f, 100.f);
19 autofill_external_delegate->OnQuery(query_id, form, field, bounds, false); 19 autofill_external_delegate->OnQuery(query_id, form, field, bounds, false);
20 20
21 std::vector<base::string16> autofill_item; 21 std::vector<Suggestion> suggestions;
22 autofill_item.push_back(base::string16()); 22 suggestions.push_back(Suggestion());
23 std::vector<int> autofill_id; 23 autofill_external_delegate->OnSuggestionsReturned(query_id, suggestions);
24 autofill_id.push_back(0);
25 autofill_external_delegate->OnSuggestionsReturned(
26 query_id, autofill_item, autofill_item, autofill_item, autofill_id);
27 } 24 }
28 25
29 } // namespace autofill 26 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/test_autofill_client.cc ('k') | components/autofill/core/browser/webdata/autofill_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698