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

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

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/password_manager/core/browser/password_autofill_manager.h" 5 #include "components/password_manager/core/browser/password_autofill_manager.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/autofill/core/browser/popup_item_ids.h" 10 #include "components/autofill/core/browser/popup_item_ids.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 autofill::FormFieldData password_field; 86 autofill::FormFieldData password_field;
87 password_field.name = base::ASCIIToUTF16(kPasswordName); 87 password_field.name = base::ASCIIToUTF16(kPasswordName);
88 password_field.value = test_password_; 88 password_field.value = test_password_;
89 fill_data_.basic_data.fields.push_back(password_field); 89 fill_data_.basic_data.fields.push_back(password_field);
90 } 90 }
91 91
92 void InitializePasswordAutofillManager( 92 void InitializePasswordAutofillManager(
93 PasswordManagerClient* client, 93 PasswordManagerClient* client,
94 autofill::AutofillClient* autofill_client) { 94 autofill::AutofillClient* autofill_client) {
95 password_autofill_manager_.reset( 95 password_autofill_manager_.reset(new PasswordAutofillManager(
96 new PasswordAutofillManager(client, autofill_client)); 96 client, client->GetDriver(), autofill_client));
97 password_autofill_manager_->OnAddPasswordFormMapping(fill_data_id_, 97 password_autofill_manager_->OnAddPasswordFormMapping(fill_data_id_,
98 fill_data_); 98 fill_data_);
99 } 99 }
100 100
101 protected: 101 protected:
102 int fill_data_id() { return fill_data_id_; } 102 int fill_data_id() { return fill_data_id_; }
103 103
104 scoped_ptr<PasswordAutofillManager> password_autofill_manager_; 104 scoped_ptr<PasswordAutofillManager> password_autofill_manager_;
105 105
106 base::string16 test_username_; 106 base::string16 test_username_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 element_bounds, _, 259 element_bounds, _,
260 testing::UnorderedElementsAre( 260 testing::UnorderedElementsAre(
261 test_username_, additional_username, other_username), 261 test_username_, additional_username, other_username),
262 _, _, _, _)); 262 _, _, _, _));
263 password_autofill_manager_->OnShowPasswordSuggestions( 263 password_autofill_manager_->OnShowPasswordSuggestions(
264 dummy_key, base::i18n::RIGHT_TO_LEFT, base::ASCIIToUTF16("xyz"), true, 264 dummy_key, base::i18n::RIGHT_TO_LEFT, base::ASCIIToUTF16("xyz"), true,
265 element_bounds); 265 element_bounds);
266 } 266 }
267 267
268 } // namespace password_manager 268 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698