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

Unified Diff: components/autofill/browser/autocomplete_history_manager_unittest.cc

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nits Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/autocomplete_history_manager_unittest.cc
diff --git a/components/autofill/browser/autocomplete_history_manager_unittest.cc b/components/autofill/browser/autocomplete_history_manager_unittest.cc
index b8b144eae002a3c69de875cf38a06222240db39f..c93ea2d1fbc12076787733ad7b2d35e2812dd7f4 100644
--- a/components/autofill/browser/autocomplete_history_manager_unittest.cc
+++ b/components/autofill/browser/autocomplete_history_manager_unittest.cc
@@ -229,30 +229,12 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate);
};
-class AutocompleteHistoryManagerStubSend : public AutocompleteHistoryManager {
- public:
- explicit AutocompleteHistoryManagerStubSend(WebContents* web_contents)
- : AutocompleteHistoryManager(web_contents) {}
-
- // Increase visibility for testing.
- void SendSuggestions(const std::vector<base::string16>* suggestions) {
- AutocompleteHistoryManager::SendSuggestions(suggestions);
- }
-
- // Intentionally swallow the message.
- virtual bool Send(IPC::Message* message) OVERRIDE {
- delete message;
- return true;
- }
-};
-
} // namespace
// Make sure our external delegate is called at the right time.
TEST_F(AutocompleteHistoryManagerTest, ExternalDelegate) {
- // Local version with a stubbed out Send()
- AutocompleteHistoryManagerStubSend autocomplete_history_manager(
- web_contents());
+ AutocompleteHistoryManager autocomplete_history_manager(web_contents());
+ autocomplete_history_manager.send_IPC_ = false;
AutofillManager::CreateForWebContentsAndDelegate(
web_contents(),

Powered by Google App Engine
This is Rietveld 408576698