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

Side by Side Diff: components/autofill/core/browser/form_structure_unittest.cc

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/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 "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 using base::ASCIIToUTF16; 16 using base::ASCIIToUTF16;
17 17
18 namespace autofill { 18 namespace autofill {
19 namespace { 19 namespace {
20 20
21 // Unlike the base AutofillMetrics, exposes copy and assignment constructors, 21 // Unlike the base AutofillMetrics, exposes copy and assignment constructors,
22 // which are handy for briefer test code. The AutofillMetrics class is 22 // which are handy for briefer test code. The AutofillMetrics class is
23 // stateless, so this is safe. 23 // stateless, so this is safe.
24 class TestAutofillMetrics : public AutofillMetrics { 24 class TestAutofillMetrics : public AutofillMetrics {
25 public: 25 public:
26 TestAutofillMetrics() {} 26 TestAutofillMetrics() {}
27 virtual ~TestAutofillMetrics() {} 27 ~TestAutofillMetrics() override {}
28 }; 28 };
29 29
30 } // anonymous namespace 30 } // anonymous namespace
31 31
32 32
33 namespace content { 33 namespace content {
34 34
35 std::ostream& operator<<(std::ostream& os, const FormData& form) { 35 std::ostream& operator<<(std::ostream& os, const FormData& form) {
36 os << base::UTF16ToUTF8(form.name) 36 os << base::UTF16ToUTF8(form.name)
37 << " " 37 << " "
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 // A freeform input (<input>) allows any value (overriding other <select>s). 2341 // A freeform input (<input>) allows any value (overriding other <select>s).
2342 FormFieldData freeform_field; 2342 FormFieldData freeform_field;
2343 freeform_field.autocomplete_attribute = "billing country"; 2343 freeform_field.autocomplete_attribute = "billing country";
2344 form_data.fields.push_back(freeform_field); 2344 form_data.fields.push_back(freeform_field);
2345 FormStructure form_structure2(form_data); 2345 FormStructure form_structure2(form_data);
2346 form_structure2.ParseFieldTypesFromAutocompleteAttributes(&unused, &unused); 2346 form_structure2.ParseFieldTypesFromAutocompleteAttributes(&unused, &unused);
2347 EXPECT_EQ(0U, form_structure2.PossibleValues(ADDRESS_BILLING_COUNTRY).size()); 2347 EXPECT_EQ(0U, form_structure2.PossibleValues(ADDRESS_BILLING_COUNTRY).size());
2348 } 2348 }
2349 2349
2350 } // namespace autofill 2350 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/email_field.h ('k') | components/autofill/core/browser/name_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698