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

Side by Side Diff: components/password_manager/core/browser/password_generation_manager_unittest.cc

Issue 208453002: Add "previewing on hover" support for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per further review comments. Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/testing_pref_service.h" 9 #include "base/prefs/testing_pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE { 53 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE {
54 return &password_autofill_manager_; 54 return &password_autofill_manager_;
55 } 55 }
56 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) 56 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form)
57 OVERRIDE {} 57 OVERRIDE {}
58 virtual void AccountCreationFormsFound( 58 virtual void AccountCreationFormsFound(
59 const std::vector<autofill::FormData>& forms) OVERRIDE { 59 const std::vector<autofill::FormData>& forms) OVERRIDE {
60 found_account_creation_forms_.insert( 60 found_account_creation_forms_.insert(
61 found_account_creation_forms_.begin(), forms.begin(), forms.end()); 61 found_account_creation_forms_.begin(), forms.begin(), forms.end());
62 } 62 }
63 virtual void AcceptPasswordAutofillSuggestion( 63 virtual void FillSuggestion(const base::string16& username,
64 const base::string16& username, 64 const base::string16& password) OVERRIDE {}
65 const base::string16& password) OVERRIDE { 65 virtual void PreviewSuggestion(const base::string16& username,
66 } 66 const base::string16& password) OVERRIDE {}
67 virtual void ClearPreviewedForm() OVERRIDE {}
67 68
68 const std::vector<autofill::FormData>& GetFoundAccountCreationForms() { 69 const std::vector<autofill::FormData>& GetFoundAccountCreationForms() {
69 return found_account_creation_forms_; 70 return found_account_creation_forms_;
70 } 71 }
71 void set_is_off_the_record(bool is_off_the_record) { 72 void set_is_off_the_record(bool is_off_the_record) {
72 is_off_the_record_ = is_off_the_record; 73 is_off_the_record_ = is_off_the_record;
73 } 74 }
74 75
75 private: 76 private:
76 PasswordManager password_manager_; 77 PasswordManager password_manager_;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // be disabled. 226 // be disabled.
226 GetTestDriver()->set_is_off_the_record(true); 227 GetTestDriver()->set_is_off_the_record(true);
227 PrefService* prefs = client_->GetPrefs(); 228 PrefService* prefs = client_->GetPrefs();
228 prefs->SetBoolean(prefs::kPasswordManagerEnabled, true); 229 prefs->SetBoolean(prefs::kPasswordManagerEnabled, true);
229 client_->set_is_password_sync_enabled(true); 230 client_->set_is_password_sync_enabled(true);
230 231
231 EXPECT_FALSE(IsGenerationEnabled()); 232 EXPECT_FALSE(IsGenerationEnabled());
232 } 233 }
233 234
234 } // namespace password_manager 235 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698