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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate_unittest.cc

Issue 10222017: Make password generation switched by a preference in chrome settings rather than a command line fla… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change DCHECK_EQ to DCHECK to get around some type convertion issue. Created 8 years, 7 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 | « chrome/app/generated_resources.grd ('k') | chrome/browser/autofill/autofill_manager.h » ('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/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/autofill/autofill_manager.h" 10 #include "chrome/browser/autofill/autofill_manager.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 MOCK_METHOD0(HideAutofillPopup, void()); 51 MOCK_METHOD0(HideAutofillPopup, void());
52 52
53 private: 53 private:
54 virtual void HideAutofillPopupInternal() {}; 54 virtual void HideAutofillPopupInternal() {};
55 }; 55 };
56 56
57 class MockAutofillManager : public AutofillManager { 57 class MockAutofillManager : public AutofillManager {
58 public: 58 public:
59 explicit MockAutofillManager(TabContentsWrapper* tab_contents) 59 explicit MockAutofillManager(TabContentsWrapper* tab_contents)
60 : AutofillManager(tab_contents) {} 60 // Force to use the constructor designated for unit test, but we don't
61 // really need personal_data in this test so we pass a NULL pointer.
62 : AutofillManager(tab_contents, NULL) {}
61 63
62 MOCK_METHOD4(OnFillAutofillFormData, 64 MOCK_METHOD4(OnFillAutofillFormData,
63 void(int query_id, 65 void(int query_id,
64 const webkit::forms::FormData& form, 66 const webkit::forms::FormData& form,
65 const webkit::forms::FormField& field, 67 const webkit::forms::FormField& field,
66 int unique_id)); 68 int unique_id));
67 69
68 protected: 70 protected:
69 virtual ~MockAutofillManager() {} 71 virtual ~MockAutofillManager() {}
70 }; 72 };
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 external_delegate_->SelectAutofillSuggestionAtIndex(1); 166 external_delegate_->SelectAutofillSuggestionAtIndex(1);
165 } 167 }
166 168
167 // Test that the popup is hidden once we are done editing the autofill field. 169 // Test that the popup is hidden once we are done editing the autofill field.
168 TEST_F(AutofillExternalDelegateUnitTest, 170 TEST_F(AutofillExternalDelegateUnitTest,
169 ExternalDelegateHidePopupAfterEditing) { 171 ExternalDelegateHidePopupAfterEditing) {
170 EXPECT_CALL(*external_delegate_, HideAutofillPopup()); 172 EXPECT_CALL(*external_delegate_, HideAutofillPopup());
171 173
172 external_delegate_->DidEndTextFieldEditing(); 174 external_delegate_->DidEndTextFieldEditing();
173 } 175 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698