summaryrefslogtreecommitdiffstats
path: root/components/autofill/browser/test_autofill_external_delegate.cc
blob: e9643d889b1ba113019c9812b7488b9137893f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/browser/test_autofill_external_delegate.h"

#include "ui/gfx/rect.h"

namespace autofill {

void GenerateTestAutofillPopup(
    AutofillExternalDelegate* autofill_external_delegate) {
  int query_id = 1;
  FormData form;
  FormFieldData field;
  field.is_focusable = true;
  field.should_autocomplete = true;
  gfx::RectF bounds(100.f, 100.f);
  autofill_external_delegate->OnQuery(query_id, form, field, bounds, false);

  std::vector<base::string16> autofill_item;
  autofill_item.push_back(base::string16());
  std::vector<int> autofill_id;
  autofill_id.push_back(0);
  autofill_external_delegate->OnSuggestionsReturned(
      query_id, autofill_item, autofill_item, autofill_item, autofill_id);
}

}  // namespace autofill