| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill_cc_infobar_delegate.h" | 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 8 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 9 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 9 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 std::string(const CreditCard& imported_credit_card)); | 45 std::string(const CreditCard& imported_credit_card)); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); | 48 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 class AutofillCCInfobarDelegateTest : public ChromeRenderViewHostTestHarness { | 53 class AutofillCCInfobarDelegateTest : public ChromeRenderViewHostTestHarness { |
| 54 public: | 54 public: |
| 55 virtual ~AutofillCCInfobarDelegateTest(); | 55 ~AutofillCCInfobarDelegateTest() override; |
| 56 | 56 |
| 57 virtual void SetUp() override; | 57 void SetUp() override; |
| 58 virtual void TearDown() override; | 58 void TearDown() override; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 scoped_ptr<ConfirmInfoBarDelegate> CreateDelegate( | 61 scoped_ptr<ConfirmInfoBarDelegate> CreateDelegate( |
| 62 MockAutofillMetrics* metric_logger); | 62 MockAutofillMetrics* metric_logger); |
| 63 | 63 |
| 64 scoped_ptr<TestPersonalDataManager> personal_data_; | 64 scoped_ptr<TestPersonalDataManager> personal_data_; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 AutofillCCInfobarDelegateTest::~AutofillCCInfobarDelegateTest() {} | 67 AutofillCCInfobarDelegateTest::~AutofillCCInfobarDelegateTest() {} |
| 68 | 68 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 { | 152 { |
| 153 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate(&metric_logger)); | 153 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate(&metric_logger)); |
| 154 ASSERT_TRUE(infobar); | 154 ASSERT_TRUE(infobar); |
| 155 EXPECT_CALL(metric_logger, | 155 EXPECT_CALL(metric_logger, |
| 156 LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_IGNORED)) | 156 LogCreditCardInfoBarMetric(AutofillMetrics::INFOBAR_IGNORED)) |
| 157 .Times(1); | 157 .Times(1); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace autofill | 161 } // namespace autofill |
| OLD | NEW |