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

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: Created 5 years, 10 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: 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..57cb6d782da4d30504a636a726c56d149c3a6662 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;
+ SerializeFormData(data, &serialized_data);
+
+ FormData actual;
+ EXPECT_TRUE(DeserializeFormData(serialized_data.c_str(), &actual));
+
+ EXPECT_TRUE(actual.SameFormAs(data));
+}
+
} // namespace autofill
« components/autofill/core/common/form_data.cc ('K') | « 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