| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/ui/autofill/autocheckout_bubble_controller.h" | 8 #include "chrome/browser/ui/autofill/autocheckout_bubble_controller.h" |
| 9 #include "components/autofill/browser/autofill_metrics.h" | 9 #include "components/autofill/core/browser/autofill_metrics.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 | 12 |
| 13 namespace autofill { | 13 namespace autofill { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 class TestAutofillMetrics : public AutofillMetrics { | 16 class TestAutofillMetrics : public AutofillMetrics { |
| 17 public: | 17 public: |
| 18 TestAutofillMetrics() | 18 TestAutofillMetrics() |
| 19 : metric_(NUM_BUBBLE_METRICS) {} | 19 : metric_(NUM_BUBBLE_METRICS) {} |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Test that after a bubble is dismissed it is not considered ignored. | 138 // Test that after a bubble is dismissed it is not considered ignored. |
| 139 controller.BubbleDestroyed(); | 139 controller.BubbleDestroyed(); |
| 140 | 140 |
| 141 EXPECT_EQ(AutofillMetrics::BUBBLE_DISMISSED, | 141 EXPECT_EQ(AutofillMetrics::BUBBLE_DISMISSED, |
| 142 controller.get_metric_logger()->metric()); | 142 controller.get_metric_logger()->metric()); |
| 143 EXPECT_EQ(0, callback.accepted_count()); | 143 EXPECT_EQ(0, callback.accepted_count()); |
| 144 EXPECT_EQ(1, callback.dismissed_count()); | 144 EXPECT_EQ(1, callback.dismissed_count()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace autofill | 147 } // namespace autofill |
| OLD | NEW |