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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc

Issue 148413002: Add "previewing on hover" support for single-field autocomplete input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stated that no-op for new Autocomplete functions in autofill dialog file. Created 6 years, 10 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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/weak_ptr.h" 6 #include "base/memory/weak_ptr.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
10 #include "chrome/browser/ui/autofill/autofill_popup_view.h" 10 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
(...skipping 27 matching lines...) Expand all
38 namespace { 38 namespace {
39 39
40 class MockAutofillExternalDelegate : public AutofillExternalDelegate { 40 class MockAutofillExternalDelegate : public AutofillExternalDelegate {
41 public: 41 public:
42 MockAutofillExternalDelegate(AutofillManager* autofill_manager, 42 MockAutofillExternalDelegate(AutofillManager* autofill_manager,
43 AutofillDriver* autofill_driver) 43 AutofillDriver* autofill_driver)
44 : AutofillExternalDelegate(autofill_manager, autofill_driver) {} 44 : AutofillExternalDelegate(autofill_manager, autofill_driver) {}
45 virtual ~MockAutofillExternalDelegate() {} 45 virtual ~MockAutofillExternalDelegate() {}
46 46
47 virtual void DidSelectSuggestion(int identifier) OVERRIDE {} 47 virtual void DidSelectSuggestion(int identifier) OVERRIDE {}
48 virtual void DidSelectAutocompleteSuggestion(const base::string16& value)
49 OVERRIDE {}
48 virtual void RemoveSuggestion(const base::string16& value, 50 virtual void RemoveSuggestion(const base::string16& value,
49 int identifier) OVERRIDE {} 51 int identifier) OVERRIDE {}
50 virtual void ClearPreviewedForm() OVERRIDE {} 52 virtual void ClearPreviewedForm() OVERRIDE {}
53 virtual void ClearAutocompletePreviewedField() OVERRIDE {}
51 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() { 54 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() {
52 return AutofillExternalDelegate::GetWeakPtr(); 55 return AutofillExternalDelegate::GetWeakPtr();
53 } 56 }
54 }; 57 };
55 58
56 class MockAutofillManagerDelegate 59 class MockAutofillManagerDelegate
57 : public autofill::TestAutofillManagerDelegate { 60 : public autofill::TestAutofillManagerDelegate {
58 public: 61 public:
59 MockAutofillManagerDelegate() 62 MockAutofillManagerDelegate()
60 : prefs_(autofill::test::PrefServiceForTesting()) { 63 : prefs_(autofill::test::PrefServiceForTesting()) {
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]); 533 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]);
531 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]); 534 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]);
532 535
533 // The second element was shorter so it should be unchanged. 536 // The second element was shorter so it should be unchanged.
534 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]); 537 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]);
535 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]); 538 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]);
536 } 539 }
537 #endif 540 #endif
538 541
539 } // namespace autofill 542 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698