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

Unified Diff: components/autofill/core/common/form_data_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
« no previous file with comments | « components/autofill/core/common/form_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/common/form_data_unittest.cc
diff --git a/components/autofill/core/common/form_data_unittest.cc b/components/autofill/core/common/form_data_unittest.cc
index 3b75ab87492571c2e800ee83fcab73b2b61c1bb3..eedd2c490ce5e82fdaf50cc7ce584cec37a36c5b 100644
--- a/components/autofill/core/common/form_data_unittest.cc
+++ b/components/autofill/core/common/form_data_unittest.cc
@@ -147,4 +147,18 @@ TEST(FormDataTest, SerializeIncorrectFormatAndDeserialize) {
EXPECT_FALSE(DeserializeFormData(&iter, &actual));
}
+TEST(FormDataTest, SerializeAndDeserializeInStrings) {
+ FormData data;
+ FillInDummyFormData(&data);
+ data.is_form_tag = false;
+
+ std::string serialized_data;
+ SerializeFormDataToBase64String(data, &serialized_data);
+
+ FormData actual;
+ EXPECT_TRUE(DeserializeFormDataFromBase64String(serialized_data, &actual));
+
+ EXPECT_TRUE(actual.SameFormAs(data));
+}
+
} // namespace autofill
« no previous file with comments | « components/autofill/core/common/form_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698