OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autofill/form_structure.h" | 5 #include "components/autofill/browser/form_structure.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/autofill/autofill_metrics.h" | 10 #include "components/autofill/browser/autofill_metrics.h" |
11 #include "components/autofill/common/form_data.h" | 11 #include "components/autofill/common/form_data.h" |
12 #include "components/autofill/common/form_field_data.h" | 12 #include "components/autofill/common/form_field_data.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
16 | 16 |
17 using WebKit::WebInputElement; | 17 using WebKit::WebInputElement; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
(...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 field.form_control_type = "submit"; | 2193 field.form_control_type = "submit"; |
2194 form.fields.push_back(field); | 2194 form.fields.push_back(field); |
2195 | 2195 |
2196 EXPECT_EQ(form, FormStructure(form, std::string()).ToFormData()); | 2196 EXPECT_EQ(form, FormStructure(form, std::string()).ToFormData()); |
2197 | 2197 |
2198 // Currently |FormStructure(form_data)ToFormData().user_submitted| is always | 2198 // Currently |FormStructure(form_data)ToFormData().user_submitted| is always |
2199 // false. This forces a future author that changes this to update this test. | 2199 // false. This forces a future author that changes this to update this test. |
2200 form.user_submitted = true; | 2200 form.user_submitted = true; |
2201 EXPECT_NE(form, FormStructure(form, std::string()).ToFormData()); | 2201 EXPECT_NE(form, FormStructure(form, std::string()).ToFormData()); |
2202 } | 2202 } |
OLD | NEW |