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

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: Rebase and update code as per Ilya's comments Created 6 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
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 25 matching lines...) Expand all
36 namespace autofill { 36 namespace autofill {
37 namespace { 37 namespace {
38 38
39 class MockAutofillExternalDelegate : public AutofillExternalDelegate { 39 class MockAutofillExternalDelegate : public AutofillExternalDelegate {
40 public: 40 public:
41 MockAutofillExternalDelegate(AutofillManager* autofill_manager, 41 MockAutofillExternalDelegate(AutofillManager* autofill_manager,
42 AutofillDriver* autofill_driver) 42 AutofillDriver* autofill_driver)
43 : AutofillExternalDelegate(autofill_manager, autofill_driver) {} 43 : AutofillExternalDelegate(autofill_manager, autofill_driver) {}
44 virtual ~MockAutofillExternalDelegate() {} 44 virtual ~MockAutofillExternalDelegate() {}
45 45
46 virtual void DidSelectSuggestion(int identifier) OVERRIDE {} 46 virtual void DidSelectSuggestion(const base::string16& value,
47 int identifier) OVERRIDE {}
47 virtual void RemoveSuggestion(const base::string16& value, 48 virtual void RemoveSuggestion(const base::string16& value,
48 int identifier) OVERRIDE {} 49 int identifier) OVERRIDE {}
49 virtual void ClearPreviewedForm() OVERRIDE {} 50 virtual void ClearPreviewedForm() OVERRIDE {}
50 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() { 51 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr() {
51 return AutofillExternalDelegate::GetWeakPtr(); 52 return AutofillExternalDelegate::GetWeakPtr();
52 } 53 }
53 }; 54 };
54 55
55 class MockAutofillManagerDelegate 56 class MockAutofillManagerDelegate
56 : public autofill::TestAutofillManagerDelegate { 57 : public autofill::TestAutofillManagerDelegate {
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]); 530 EXPECT_NE(names[0], autofill_popup_controller_->names()[0]);
530 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]); 531 EXPECT_NE(subtexts[0], autofill_popup_controller_->subtexts()[0]);
531 532
532 // The second element was shorter so it should be unchanged. 533 // The second element was shorter so it should be unchanged.
533 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]); 534 EXPECT_EQ(names[1], autofill_popup_controller_->names()[1]);
534 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]); 535 EXPECT_EQ(subtexts[1], autofill_popup_controller_->subtexts()[1]);
535 } 536 }
536 #endif 537 #endif
537 538
538 } // namespace autofill 539 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698