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 "chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
11 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" | 11 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" |
12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
13 #include "components/autofill/core/browser/autofill_client.h" | 13 #include "components/autofill/core/browser/autofill_client.h" |
14 #include "components/autofill/core/browser/autofill_metrics.h" | 14 #include "components/autofill/core/browser/autofill_metrics.h" |
15 #include "components/autofill/core/browser/autofill_test_utils.h" | 15 #include "components/autofill/core/browser/autofill_test_utils.h" |
16 #include "components/autofill/core/common/autofill_pref_names.h" | 16 #include "components/autofill/core/common/autofill_pref_names.h" |
17 #include "components/user_prefs/user_prefs.h" | 17 #include "components/user_prefs/user_prefs.h" |
| 18 #include "content/public/browser/browser_context.h" |
18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
19 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
20 | 21 |
21 namespace autofill { | 22 namespace autofill { |
22 | 23 |
23 using base::ASCIIToUTF16; | 24 using base::ASCIIToUTF16; |
24 | 25 |
25 class TestCardUnmaskDelegate : public CardUnmaskDelegate { | 26 class TestCardUnmaskDelegate : public CardUnmaskDelegate { |
26 public: | 27 public: |
27 TestCardUnmaskDelegate() : weak_factory_(this) {} | 28 TestCardUnmaskDelegate() : weak_factory_(this) {} |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 ShowPrompt(); | 515 ShowPrompt(); |
515 | 516 |
516 for (size_t i = 0; i < arraysize(exp_cases); ++i) { | 517 for (size_t i = 0; i < arraysize(exp_cases); ++i) { |
517 EXPECT_EQ(exp_cases[i].valid, controller_->InputExpirationIsValid( | 518 EXPECT_EQ(exp_cases[i].valid, controller_->InputExpirationIsValid( |
518 ASCIIToUTF16(exp_cases[i].input_month), | 519 ASCIIToUTF16(exp_cases[i].input_month), |
519 ASCIIToUTF16(exp_cases[i].input_year))); | 520 ASCIIToUTF16(exp_cases[i].input_year))); |
520 } | 521 } |
521 } | 522 } |
522 | 523 |
523 } // namespace autofill | 524 } // namespace autofill |
OLD | NEW |