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

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

Issue 365783002: Autofill: don't require POST method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove method_ member Created 6 years, 5 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 | « components/autofill/core/common/save_password_progress_logger_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/password_manager/core/browser/login_database.h" 5 #include "components/password_manager/core/browser/login_database.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 form.username_value = ASCIIToUTF16("test@gmail.com"); 127 form.username_value = ASCIIToUTF16("test@gmail.com");
128 form.password_element = ASCIIToUTF16("Passwd"); 128 form.password_element = ASCIIToUTF16("Passwd");
129 form.password_value = ASCIIToUTF16("test"); 129 form.password_value = ASCIIToUTF16("test");
130 form.submit_element = ASCIIToUTF16("signIn"); 130 form.submit_element = ASCIIToUTF16("signIn");
131 form.signon_realm = "http://www.google.com/"; 131 form.signon_realm = "http://www.google.com/";
132 form.ssl_valid = false; 132 form.ssl_valid = false;
133 form.preferred = false; 133 form.preferred = false;
134 form.scheme = PasswordForm::SCHEME_HTML; 134 form.scheme = PasswordForm::SCHEME_HTML;
135 form.times_used = 1; 135 form.times_used = 1;
136 form.form_data.name = ASCIIToUTF16("form_name"); 136 form.form_data.name = ASCIIToUTF16("form_name");
137 form.form_data.method = ASCIIToUTF16("POST");
138 form.date_synced = base::Time::Now(); 137 form.date_synced = base::Time::Now();
139 138
140 // Add it and make sure it is there and that all the fields were retrieved 139 // Add it and make sure it is there and that all the fields were retrieved
141 // correctly. 140 // correctly.
142 EXPECT_EQ(AddChangeForForm(form), db_.AddLogin(form)); 141 EXPECT_EQ(AddChangeForForm(form), db_.AddLogin(form));
143 EXPECT_TRUE(db_.GetAutofillableLogins(&result)); 142 EXPECT_TRUE(db_.GetAutofillableLogins(&result));
144 ASSERT_EQ(1U, result.size()); 143 ASSERT_EQ(1U, result.size());
145 FormsAreEqual(form, *result[0]); 144 FormsAreEqual(form, *result[0]);
146 delete result[0]; 145 delete result[0];
147 result.clear(); 146 result.clear();
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 // This tests that sql::Connection::set_restrict_to_user() was called, 946 // This tests that sql::Connection::set_restrict_to_user() was called,
948 // and that function is a noop on non-POSIX platforms in any case. 947 // and that function is a noop on non-POSIX platforms in any case.
949 TEST_F(LoginDatabaseTest, FilePermissions) { 948 TEST_F(LoginDatabaseTest, FilePermissions) {
950 int mode = base::FILE_PERMISSION_MASK; 949 int mode = base::FILE_PERMISSION_MASK;
951 EXPECT_TRUE(base::GetPosixFilePermissions(file_, &mode)); 950 EXPECT_TRUE(base::GetPosixFilePermissions(file_, &mode));
952 EXPECT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode); 951 EXPECT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
953 } 952 }
954 #endif // defined(OS_POSIX) 953 #endif // defined(OS_POSIX)
955 954
956 } // namespace password_manager 955 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/autofill/core/common/save_password_progress_logger_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698