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

Unified Diff: chrome/browser/password_manager/native_backend_libsecret_unittest.cc

Issue 980583002: Serialize form_data in Gnome keyring password store service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style fix Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/native_backend_libsecret_unittest.cc
diff --git a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
index c0687dedba0c4ced1aa27e89f970ca3fa7b4e94d..40fbbc41a80913112f61772085d0a19e7d4cb55d 100644
--- a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
@@ -281,6 +281,8 @@ class NativeBackendLibsecretTest : public testing::Test {
form_google_.federation_url = GURL("http://www.google.com/federation_url");
form_google_.skip_zero_click = true;
form_google_.generation_upload_status = PasswordForm::POSITIVE_SIGNAL_SENT;
+ form_google_.form_data.name = UTF8ToUTF16("form_name");
+ form_google_.form_data.user_submitted = true;
form_facebook_.origin = GURL("http://www.facebook.com/");
form_facebook_.action = GURL("http://www.facebook.com/login");
@@ -356,7 +358,7 @@ class NativeBackendLibsecretTest : public testing::Test {
const PasswordForm& form,
const std::string& app_string) {
EXPECT_EQ(UTF16ToUTF8(form.password_value), item->value->password);
- EXPECT_EQ(21u, g_hash_table_size(item->attributes));
+ EXPECT_EQ(22u, g_hash_table_size(item->attributes));
CheckStringAttribute(item, "origin_url", form.origin.spec());
CheckStringAttribute(item, "action_url", form.action.spec());
CheckStringAttribute(item, "username_element",
@@ -385,6 +387,11 @@ class NativeBackendLibsecretTest : public testing::Test {
CheckUint32Attribute(item, "generation_upload_status",
form.generation_upload_status);
CheckStringAttribute(item, "application", app_string);
+ autofill::FormData actual;
+ DeserializeFormDataFromBase64String(
+ static_cast<char*>(g_hash_table_lookup(item->attributes, "form_data")),
+ &actual);
+ EXPECT_TRUE(form.form_data.SameFormAs(actual));
}
// Saves |credentials| and then gets logins matching |url| and |scheme|.
« no previous file with comments | « chrome/browser/password_manager/native_backend_libsecret.cc ('k') | components/autofill/core/common/form_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698