| 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 "chrome/browser/autofill/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 "chrome/browser/autofill/autofill_metrics.h" | 
|    11 #include "chrome/common/chrome_switches.h" |    11 #include "chrome/common/chrome_switches.h" | 
|    12 #include "chrome/common/form_data.h" |    12 #include "components/autofill/common/form_data.h" | 
|    13 #include "chrome/common/form_field_data.h" |    13 #include "components/autofill/common/form_field_data.h" | 
|    14 #include "googleurl/src/gurl.h" |    14 #include "googleurl/src/gurl.h" | 
|    15 #include "testing/gtest/include/gtest/gtest.h" |    15 #include "testing/gtest/include/gtest/gtest.h" | 
|    16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |    16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 
|    17  |    17  | 
|    18 using WebKit::WebInputElement; |    18 using WebKit::WebInputElement; | 
|    19  |    19  | 
|    20 namespace { |    20 namespace { | 
|    21  |    21  | 
|    22 // Unlike the base AutofillMetrics, exposes copy and assignment constructors, |    22 // Unlike the base AutofillMetrics, exposes copy and assignment constructors, | 
|    23 // which are handy for briefer test code.  The AutofillMetrics class is |    23 // which are handy for briefer test code.  The AutofillMetrics class is | 
| (...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2194   field.form_control_type = "submit"; |  2194   field.form_control_type = "submit"; | 
|  2195   form.fields.push_back(field); |  2195   form.fields.push_back(field); | 
|  2196  |  2196  | 
|  2197   EXPECT_EQ(form, FormStructure(form, std::string()).ToFormData()); |  2197   EXPECT_EQ(form, FormStructure(form, std::string()).ToFormData()); | 
|  2198  |  2198  | 
|  2199   // Currently |FormStructure(form_data)ToFormData().user_submitted| is always |  2199   // Currently |FormStructure(form_data)ToFormData().user_submitted| is always | 
|  2200   // false. This forces a future author that changes this to update this test. |  2200   // false. This forces a future author that changes this to update this test. | 
|  2201   form.user_submitted = true; |  2201   form.user_submitted = true; | 
|  2202   EXPECT_NE(form, FormStructure(form, std::string()).ToFormData()); |  2202   EXPECT_NE(form, FormStructure(form, std::string()).ToFormData()); | 
|  2203 } |  2203 } | 
| OLD | NEW |