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/autocomplete_history_manager.h" | 10 #include "chrome/browser/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_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
13 #include "chrome/browser/webdata/web_data_service.h" | 13 #include "chrome/browser/webdata/web_data_service.h" |
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
15 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "content/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
21 #include "webkit/forms/form_data.h" | 21 #include "webkit/forms/form_data.h" |
22 | 22 |
23 using content::BrowserThread; | 23 using content::BrowserThread; |
24 using content::WebContents; | 24 using content::WebContents; |
25 using testing::_; | 25 using testing::_; |
26 using webkit::forms::FormData; | 26 using webkit::forms::FormData; |
27 | 27 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 &profile_, web_data_service_); | 187 &profile_, web_data_service_); |
188 | 188 |
189 MockAutofillExternalDelegate external_delegate( | 189 MockAutofillExternalDelegate external_delegate( |
190 TabContentsWrapper::GetCurrentWrapperForContents(contents())); | 190 TabContentsWrapper::GetCurrentWrapperForContents(contents())); |
191 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); | 191 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); |
192 autocomplete_history_manager.SetExternalDelegate(&external_delegate); | 192 autocomplete_history_manager.SetExternalDelegate(&external_delegate); |
193 | 193 |
194 // Should trigger a call to OnSuggestionsReturned, verified by the mock. | 194 // Should trigger a call to OnSuggestionsReturned, verified by the mock. |
195 autocomplete_history_manager.SendSuggestions(NULL); | 195 autocomplete_history_manager.SendSuggestions(NULL); |
196 } | 196 } |
OLD | NEW |