Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/autocomplete_history_manager_unittest.cc

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/tab_contents/test_tab_contents.h"
18 #include "content/test/test_browser_thread.h" 17 #include "content/test/test_browser_thread.h"
19 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
21 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
22 #include "webkit/forms/form_data.h" 21 #include "webkit/forms/form_data.h"
23 22
24 using content::BrowserThread; 23 using content::BrowserThread;
25 using content::WebContents; 24 using content::WebContents;
26 using testing::_; 25 using testing::_;
27 using webkit::forms::FormData; 26 using webkit::forms::FormData;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 &profile_, web_data_service_); 183 &profile_, web_data_service_);
185 184
186 MockAutofillExternalDelegate external_delegate( 185 MockAutofillExternalDelegate external_delegate(
187 TabContentsWrapper::GetCurrentWrapperForContents(contents())); 186 TabContentsWrapper::GetCurrentWrapperForContents(contents()));
188 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _)); 187 EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _, _, _, _));
189 autocomplete_history_manager.SetExternalDelegate(&external_delegate); 188 autocomplete_history_manager.SetExternalDelegate(&external_delegate);
190 189
191 // Should trigger a call to OnSuggestionsReturned, verified by the mock. 190 // Should trigger a call to OnSuggestionsReturned, verified by the mock.
192 autocomplete_history_manager.SendSuggestions(NULL); 191 autocomplete_history_manager.SendSuggestions(NULL);
193 } 192 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698