OLD | NEW |
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" |
11 #include "chrome/browser/autofill/test_autofill_external_delegate.h" | 11 #include "chrome/browser/autofill/test_autofill_external_delegate.h" |
12 #include "chrome/browser/ui/tab_contents/tab_contents.h" | |
13 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" | 12 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" |
14 #include "chrome/browser/webdata/web_data_service.h" | 13 #include "chrome/browser/webdata/web_data_service.h" |
15 #include "chrome/common/form_data.h" | 14 #include "chrome/common/form_data.h" |
16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
17 #include "chrome/test/base/testing_browser_process.h" | 16 #include "chrome/test/base/testing_browser_process.h" |
18 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
19 #include "content/public/test/test_browser_thread.h" | 18 #include "content/public/test/test_browser_thread.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 scoped_ptr<AutofillWebDataService>( | 192 scoped_ptr<AutofillWebDataService>( |
194 new AutofillWebDataServiceImpl(web_data_service_))); | 193 new AutofillWebDataServiceImpl(web_data_service_))); |
195 | 194 |
196 MockAutofillExternalDelegate external_delegate(web_contents()); | 195 MockAutofillExternalDelegate external_delegate(web_contents()); |
197 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); | 196 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); |
198 autocomplete_history_manager.SetExternalDelegate(&external_delegate); | 197 autocomplete_history_manager.SetExternalDelegate(&external_delegate); |
199 | 198 |
200 // Should trigger a call to OnSuggestionsReturned, verified by the mock. | 199 // Should trigger a call to OnSuggestionsReturned, verified by the mock. |
201 autocomplete_history_manager.SendSuggestions(NULL); | 200 autocomplete_history_manager.SendSuggestions(NULL); |
202 } | 201 } |
OLD | NEW |