| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/task.h" | |
| 10 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/autocomplete_history_manager.h" | 10 #include "chrome/browser/autocomplete_history_manager.h" |
| 12 #include "chrome/browser/autofill/autofill_external_delegate.h" | 11 #include "chrome/browser/autofill/autofill_external_delegate.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "chrome/browser/webdata/web_data_service.h" | 13 #include "chrome/browser/webdata/web_data_service.h" |
| 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 16 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
| 17 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 18 #include "content/browser/tab_contents/test_tab_contents.h" | 17 #include "content/browser/tab_contents/test_tab_contents.h" |
| 19 #include "content/test/test_browser_thread.h" | 18 #include "content/test/test_browser_thread.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 &profile_, web_data_service_); | 198 &profile_, web_data_service_); |
| 200 | 199 |
| 201 MockAutofillExternalDelegate external_delegate( | 200 MockAutofillExternalDelegate external_delegate( |
| 202 TabContentsWrapper::GetCurrentWrapperForContents(contents())); | 201 TabContentsWrapper::GetCurrentWrapperForContents(contents())); |
| 203 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); | 202 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); |
| 204 autocomplete_history_manager.SetExternalDelegate(&external_delegate); | 203 autocomplete_history_manager.SetExternalDelegate(&external_delegate); |
| 205 | 204 |
| 206 // Should trigger a call to OnSuggestionsReturned, verified by the mock. | 205 // Should trigger a call to OnSuggestionsReturned, verified by the mock. |
| 207 autocomplete_history_manager.SendSuggestions(NULL); | 206 autocomplete_history_manager.SendSuggestions(NULL); |
| 208 } | 207 } |
| OLD | NEW |