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

Side by Side Diff: components/autofill/core/common/form_data_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
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/autofill/core/common/form_data.h" 5 #include "components/autofill/core/common/form_data.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace autofill { 11 namespace autofill {
12 12
13 TEST(FormDataTest, SerializeAndDeserialize) { 13 TEST(FormDataTest, SerializeAndDeserialize) {
14 FormData data; 14 FormData data;
15 data.name = base::ASCIIToUTF16("name"); 15 data.name = base::ASCIIToUTF16("name");
16 data.method = base::ASCIIToUTF16("POST");
17 data.origin = GURL("origin"); 16 data.origin = GURL("origin");
18 data.action = GURL("action"); 17 data.action = GURL("action");
19 data.user_submitted = true; 18 data.user_submitted = true;
20 19
21 FormFieldData field_data; 20 FormFieldData field_data;
22 field_data.label = base::ASCIIToUTF16("label"); 21 field_data.label = base::ASCIIToUTF16("label");
23 field_data.name = base::ASCIIToUTF16("name"); 22 field_data.name = base::ASCIIToUTF16("name");
24 field_data.value = base::ASCIIToUTF16("value"); 23 field_data.value = base::ASCIIToUTF16("value");
25 field_data.form_control_type = "password"; 24 field_data.form_control_type = "password";
26 field_data.autocomplete_attribute = "off"; 25 field_data.autocomplete_attribute = "off";
(...skipping 21 matching lines...) Expand all
48 SerializeFormData(data, &pickle); 47 SerializeFormData(data, &pickle);
49 48
50 PickleIterator iter(pickle); 49 PickleIterator iter(pickle);
51 FormData actual; 50 FormData actual;
52 EXPECT_TRUE(DeserializeFormData(&iter, &actual)); 51 EXPECT_TRUE(DeserializeFormData(&iter, &actual));
53 52
54 EXPECT_EQ(actual, data); 53 EXPECT_EQ(actual, data);
55 } 54 }
56 55
57 } // namespace autofill 56 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/common/form_data.cc ('k') | components/autofill/core/common/save_password_progress_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698