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

Side by Side Diff: chrome/renderer/autofill/fake_content_password_manager_driver.cc

Issue 2893903002: [Password Generation] Set TYPE_GENERATED to presaved credentials (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_generation_agent.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/renderer/autofill/fake_content_password_manager_driver.h" 5 #include "chrome/renderer/autofill/fake_content_password_manager_driver.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h"
8
7 FakeContentPasswordManagerDriver::FakeContentPasswordManagerDriver() {} 9 FakeContentPasswordManagerDriver::FakeContentPasswordManagerDriver() {}
8 10
9 FakeContentPasswordManagerDriver::~FakeContentPasswordManagerDriver() {} 11 FakeContentPasswordManagerDriver::~FakeContentPasswordManagerDriver() {}
10 12
11 void FakeContentPasswordManagerDriver::BindRequest( 13 void FakeContentPasswordManagerDriver::BindRequest(
12 autofill::mojom::PasswordManagerDriverRequest request) { 14 autofill::mojom::PasswordManagerDriverRequest request) {
13 bindings_.AddBinding(this, std::move(request)); 15 bindings_.AddBinding(this, std::move(request));
14 } 16 }
15 17
16 // mojom::PasswordManagerDriver: 18 // mojom::PasswordManagerDriver:
(...skipping 18 matching lines...) Expand all
35 37
36 void FakeContentPasswordManagerDriver::InPageNavigation( 38 void FakeContentPasswordManagerDriver::InPageNavigation(
37 const autofill::PasswordForm& password_form) { 39 const autofill::PasswordForm& password_form) {
38 called_inpage_navigation_ = true; 40 called_inpage_navigation_ = true;
39 password_form_inpage_navigation_ = password_form; 41 password_form_inpage_navigation_ = password_form;
40 } 42 }
41 43
42 void FakeContentPasswordManagerDriver::PresaveGeneratedPassword( 44 void FakeContentPasswordManagerDriver::PresaveGeneratedPassword(
43 const autofill::PasswordForm& password_form) { 45 const autofill::PasswordForm& password_form) {
44 called_presave_generated_password_ = true; 46 called_presave_generated_password_ = true;
47 EXPECT_EQ(autofill::PasswordForm::TYPE_GENERATED, password_form.type);
45 } 48 }
46 49
47 void FakeContentPasswordManagerDriver::PasswordNoLongerGenerated( 50 void FakeContentPasswordManagerDriver::PasswordNoLongerGenerated(
48 const autofill::PasswordForm& password_form) { 51 const autofill::PasswordForm& password_form) {
49 called_password_no_longer_generated_ = true; 52 called_password_no_longer_generated_ = true;
53 EXPECT_EQ(autofill::PasswordForm::TYPE_GENERATED, password_form.type);
50 } 54 }
51 55
52 void FakeContentPasswordManagerDriver::ShowPasswordSuggestions( 56 void FakeContentPasswordManagerDriver::ShowPasswordSuggestions(
53 int key, 57 int key,
54 base::i18n::TextDirection text_direction, 58 base::i18n::TextDirection text_direction,
55 const base::string16& typed_username, 59 const base::string16& typed_username,
56 int options, 60 int options,
57 const gfx::RectF& bounds) { 61 const gfx::RectF& bounds) {
58 called_show_pw_suggestions_ = true; 62 called_show_pw_suggestions_ = true;
59 show_pw_suggestions_key_ = key; 63 show_pw_suggestions_key_ = key;
(...skipping 17 matching lines...) Expand all
77 const base::string16& generation_field) { 81 const base::string16& generation_field) {
78 called_save_generation_field_ = true; 82 called_save_generation_field_ = true;
79 save_generation_field_ = generation_field; 83 save_generation_field_ = generation_field;
80 } 84 }
81 85
82 void FakeContentPasswordManagerDriver::CheckSafeBrowsingReputation( 86 void FakeContentPasswordManagerDriver::CheckSafeBrowsingReputation(
83 const GURL& form_action, 87 const GURL& form_action,
84 const GURL& frame_url) { 88 const GURL& frame_url) {
85 called_check_safe_browsing_reputation_cnt_++; 89 called_check_safe_browsing_reputation_cnt_++;
86 } 90 }
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_generation_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698