OLD | NEW |
---|---|
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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "base/tuple.h" | 18 #include "base/tuple.h" |
19 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 19 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
20 #include "chrome/browser/password_manager/password_manager.h" | 20 #include "chrome/browser/password_manager/password_manager.h" |
21 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" | 21 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/sync/profile_sync_service.h" | 23 #include "chrome/browser/sync/profile_sync_service.h" |
24 #include "chrome/browser/sync/profile_sync_service_factory.h" | 24 #include "chrome/browser/sync/profile_sync_service_factory.h" |
25 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 25 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
26 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 26 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
27 #include "chrome/test/base/testing_profile.h" | 27 #include "chrome/test/base/testing_profile.h" |
28 #include "components/autofill/content/common/autofill_messages.h" | |
28 #include "components/autofill/core/browser/autocomplete_history_manager.h" | 29 #include "components/autofill/core/browser/autocomplete_history_manager.h" |
29 #include "components/autofill/core/browser/autofill_manager.h" | 30 #include "components/autofill/core/browser/autofill_manager.h" |
30 #include "components/autofill/core/browser/autofill_metrics.h" | 31 #include "components/autofill/core/browser/autofill_metrics.h" |
31 #include "components/autofill/core/browser/autofill_profile.h" | 32 #include "components/autofill/core/browser/autofill_profile.h" |
32 #include "components/autofill/core/browser/autofill_test_utils.h" | 33 #include "components/autofill/core/browser/autofill_test_utils.h" |
33 #include "components/autofill/core/browser/credit_card.h" | 34 #include "components/autofill/core/browser/credit_card.h" |
34 #include "components/autofill/core/browser/personal_data_manager.h" | 35 #include "components/autofill/core/browser/personal_data_manager.h" |
35 #include "components/autofill/core/browser/test_autofill_driver.h" | 36 #include "components/autofill/core/browser/test_autofill_driver.h" |
36 #include "components/autofill/core/browser/test_autofill_external_delegate.h" | 37 #include "components/autofill/core/browser/test_autofill_external_delegate.h" |
37 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" | 38 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" |
38 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 39 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
39 #include "components/autofill/core/common/autofill_messages.h" | |
40 #include "components/autofill/core/common/autofill_pref_names.h" | 40 #include "components/autofill/core/common/autofill_pref_names.h" |
41 #include "components/autofill/core/common/form_data.h" | 41 #include "components/autofill/core/common/form_data.h" |
42 #include "components/autofill/core/common/form_field_data.h" | 42 #include "components/autofill/core/common/form_field_data.h" |
43 #include "components/autofill/core/common/forms_seen_state.h" | 43 #include "components/autofill/core/common/forms_seen_state.h" |
44 #include "components/user_prefs/user_prefs.h" | 44 #include "components/user_prefs/user_prefs.h" |
45 #include "content/public/test/mock_render_process_host.h" | 45 #include "content/public/test/mock_render_process_host.h" |
46 #include "content/public/test/test_utils.h" | 46 #include "content/public/test/test_utils.h" |
47 #include "grit/component_strings.h" | 47 #include "grit/component_strings.h" |
48 #include "ipc/ipc_test_sink.h" | 48 #include "ipc/ipc_test_sink.h" |
blundell
2013/12/11 13:32:53
You should be able to kill this include I believe.
jeanfrancois
2013/12/11 15:01:19
Done.
| |
49 #include "testing/gmock/include/gmock/gmock.h" | 49 #include "testing/gmock/include/gmock/gmock.h" |
50 #include "testing/gtest/include/gtest/gtest.h" | 50 #include "testing/gtest/include/gtest/gtest.h" |
51 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 51 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
52 #include "ui/base/l10n/l10n_util.h" | 52 #include "ui/base/l10n/l10n_util.h" |
53 #include "ui/gfx/rect.h" | 53 #include "ui/gfx/rect.h" |
54 #include "url/gurl.h" | 54 #include "url/gurl.h" |
55 | 55 |
56 using content::WebContents; | 56 using content::WebContents; |
57 using testing::_; | 57 using testing::_; |
58 using blink::WebFormElement; | 58 using blink::WebFormElement; |
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2921 test::CreateTestAddressFormData(&form); | 2921 test::CreateTestAddressFormData(&form); |
2922 std::vector<FormData> forms(1, form); | 2922 std::vector<FormData> forms(1, form); |
2923 FormsSeen(forms); | 2923 FormsSeen(forms); |
2924 const FormFieldData& field = form.fields[0]; | 2924 const FormFieldData& field = form.fields[0]; |
2925 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() | 2925 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() |
2926 | 2926 |
2927 EXPECT_TRUE(external_delegate_->on_query_seen()); | 2927 EXPECT_TRUE(external_delegate_->on_query_seen()); |
2928 } | 2928 } |
2929 | 2929 |
2930 } // namespace autofill | 2930 } // namespace autofill |
OLD | NEW |