OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/ui/card_unmask_prompt_controller_impl
.h" | 5 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller_impl
.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/prefs/pref_registry_simple.h" |
| 12 #include "base/prefs/testing_pref_service.h" |
11 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
12 #include "base/test/histogram_tester.h" | 14 #include "base/test/histogram_tester.h" |
13 #include "components/autofill/core/browser/autofill_client.h" | 15 #include "components/autofill/core/browser/autofill_client.h" |
14 #include "components/autofill/core/browser/autofill_metrics.h" | 16 #include "components/autofill/core/browser/autofill_metrics.h" |
15 #include "components/autofill/core/browser/autofill_test_utils.h" | 17 #include "components/autofill/core/browser/autofill_test_utils.h" |
16 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" | 18 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" |
17 #include "components/autofill/core/common/autofill_pref_names.h" | 19 #include "components/autofill/core/common/autofill_pref_names.h" |
18 #include "components/prefs/pref_registry_simple.h" | |
19 #include "components/prefs/testing_pref_service.h" | |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 namespace autofill { | 22 namespace autofill { |
23 | 23 |
24 using base::ASCIIToUTF16; | 24 using base::ASCIIToUTF16; |
25 | 25 |
26 class TestCardUnmaskDelegate : public CardUnmaskDelegate { | 26 class TestCardUnmaskDelegate : public CardUnmaskDelegate { |
27 public: | 27 public: |
28 TestCardUnmaskDelegate() : weak_factory_(this) {} | 28 TestCardUnmaskDelegate() : weak_factory_(this) {} |
29 | 29 |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 ShowPrompt(); | 499 ShowPrompt(); |
500 | 500 |
501 for (size_t i = 0; i < arraysize(exp_cases); ++i) { | 501 for (size_t i = 0; i < arraysize(exp_cases); ++i) { |
502 EXPECT_EQ(exp_cases[i].valid, controller_->InputExpirationIsValid( | 502 EXPECT_EQ(exp_cases[i].valid, controller_->InputExpirationIsValid( |
503 ASCIIToUTF16(exp_cases[i].input_month), | 503 ASCIIToUTF16(exp_cases[i].input_month), |
504 ASCIIToUTF16(exp_cases[i].input_year))); | 504 ASCIIToUTF16(exp_cases[i].input_year))); |
505 } | 505 } |
506 } | 506 } |
507 | 507 |
508 } // namespace autofill | 508 } // namespace autofill |
OLD | NEW |