| 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/prefs/testing_pref_service.h" |    8 #include "base/prefs/testing_pref_service.h" | 
|    9 #include "base/string16.h" |    9 #include "base/string16.h" | 
|   10 #include "base/utf_string_conversions.h" |   10 #include "base/utf_string_conversions.h" | 
|   11 #include "chrome/browser/autofill/autocomplete_history_manager.h" |   11 #include "chrome/browser/autofill/autocomplete_history_manager.h" | 
|   12 #include "chrome/browser/autofill/autofill_external_delegate.h" |   12 #include "chrome/browser/autofill/autofill_external_delegate.h" | 
|   13 #include "chrome/browser/autofill/autofill_manager.h" |   13 #include "chrome/browser/autofill/autofill_manager.h" | 
|   14 #include "chrome/browser/autofill/test_autofill_manager_delegate.h" |   14 #include "chrome/browser/autofill/test_autofill_manager_delegate.h" | 
|   15 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" |   15 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" | 
|   16 #include "chrome/browser/webdata/web_data_service.h" |   16 #include "chrome/browser/webdata/web_data_service.h" | 
|   17 #include "chrome/browser/webdata/web_data_service_factory.h" |   17 #include "chrome/browser/webdata/web_data_service_factory.h" | 
|   18 #include "chrome/common/form_data.h" |  | 
|   19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |   18 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 
|   20 #include "chrome/test/base/testing_browser_process.h" |   19 #include "chrome/test/base/testing_browser_process.h" | 
|   21 #include "chrome/test/base/testing_profile.h" |   20 #include "chrome/test/base/testing_profile.h" | 
 |   21 #include "components/autofill/common/form_data.h" | 
|   22 #include "content/public/test/test_browser_thread.h" |   22 #include "content/public/test/test_browser_thread.h" | 
|   23 #include "testing/gmock/include/gmock/gmock.h" |   23 #include "testing/gmock/include/gmock/gmock.h" | 
|   24 #include "testing/gtest/include/gtest/gtest.h" |   24 #include "testing/gtest/include/gtest/gtest.h" | 
|   25 #include "ui/gfx/rect.h" |   25 #include "ui/gfx/rect.h" | 
|   26  |   26  | 
|   27 using content::BrowserThread; |   27 using content::BrowserThread; | 
|   28 using content::WebContents; |   28 using content::WebContents; | 
|   29 using testing::_; |   29 using testing::_; | 
|   30  |   30  | 
|   31 namespace { |   31 namespace { | 
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  229   AutofillManager::CreateForWebContentsAndDelegate( |  229   AutofillManager::CreateForWebContentsAndDelegate( | 
|  230       web_contents(), &manager_delegate); |  230       web_contents(), &manager_delegate); | 
|  231  |  231  | 
|  232   MockAutofillExternalDelegate external_delegate(web_contents()); |  232   MockAutofillExternalDelegate external_delegate(web_contents()); | 
|  233   autocomplete_history_manager.SetExternalDelegate(&external_delegate); |  233   autocomplete_history_manager.SetExternalDelegate(&external_delegate); | 
|  234  |  234  | 
|  235   // Should trigger a call to OnSuggestionsReturned, verified by the mock. |  235   // Should trigger a call to OnSuggestionsReturned, verified by the mock. | 
|  236   EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); |  236   EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); | 
|  237   autocomplete_history_manager.SendSuggestions(NULL); |  237   autocomplete_history_manager.SendSuggestions(NULL); | 
|  238 } |  238 } | 
| OLD | NEW |