OLD | NEW |
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/browser/form_structure.h" | 5 #include "components/autofill/core/browser/form_structure.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/autofill/core/browser/autofill_metrics.h" | 10 #include "components/autofill/core/browser/autofill_metrics.h" |
11 #include "components/autofill/core/common/form_data.h" | 11 #include "components/autofill/core/common/form_data.h" |
12 #include "components/autofill/core/common/form_field_data.h" | 12 #include "components/autofill/core/common/form_field_data.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/WebKit/public/web/WebInputElement.h" | 14 #include "third_party/WebKit/public/web/WebInputElement.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 using WebKit::WebInputElement; | 17 using blink::WebInputElement; |
18 | 18 |
19 namespace autofill { | 19 namespace autofill { |
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 |
24 // stateless, so this is safe. | 24 // stateless, so this is safe. |
25 class TestAutofillMetrics : public AutofillMetrics { | 25 class TestAutofillMetrics : public AutofillMetrics { |
26 public: | 26 public: |
27 TestAutofillMetrics() {} | 27 TestAutofillMetrics() {} |
(...skipping 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 "<field signature=\"420638584\"/></form></autofillquery>"; | 2383 "<field signature=\"420638584\"/></form></autofillquery>"; |
2384 ASSERT_TRUE(FormStructure::EncodeQueryRequest(forms.get(), | 2384 ASSERT_TRUE(FormStructure::EncodeQueryRequest(forms.get(), |
2385 &encoded_signatures, | 2385 &encoded_signatures, |
2386 &encoded_xml)); | 2386 &encoded_xml)); |
2387 ASSERT_EQ(1U, encoded_signatures.size()); | 2387 ASSERT_EQ(1U, encoded_signatures.size()); |
2388 EXPECT_EQ(kSignature, encoded_signatures[0]); | 2388 EXPECT_EQ(kSignature, encoded_signatures[0]); |
2389 EXPECT_EQ(kResponse, encoded_xml); | 2389 EXPECT_EQ(kResponse, encoded_xml); |
2390 } | 2390 } |
2391 | 2391 |
2392 } // namespace autofill | 2392 } // namespace autofill |
OLD | NEW |