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/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/ui/autofill/account_chooser_model.h" | 7 #include "chrome/browser/ui/autofill/account_chooser_model.h" |
8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "components/autofill/browser/autofill_metrics.h" | 10 #include "components/autofill/core/browser/autofill_metrics.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace autofill { | 14 namespace autofill { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class TestAccountChooserModel : public AccountChooserModel { | 18 class TestAccountChooserModel : public AccountChooserModel { |
19 public: | 19 public: |
20 TestAccountChooserModel(AccountChooserModelDelegate* delegate, | 20 TestAccountChooserModel(AccountChooserModelDelegate* delegate, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 EXPECT_CALL(*delegate(), AccountChoiceChanged()).Times(2); | 149 EXPECT_CALL(*delegate(), AccountChoiceChanged()).Times(2); |
150 | 150 |
151 model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0); | 151 model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0); |
152 EXPECT_FALSE(model()->WalletIsSelected()); | 152 EXPECT_FALSE(model()->WalletIsSelected()); |
153 | 153 |
154 model()->ExecuteCommand(TestAccountChooserModel::kActiveWalletItemId, 0); | 154 model()->ExecuteCommand(TestAccountChooserModel::kActiveWalletItemId, 0); |
155 EXPECT_TRUE(model()->WalletIsSelected()); | 155 EXPECT_TRUE(model()->WalletIsSelected()); |
156 } | 156 } |
157 | 157 |
158 } // namespace autofill | 158 } // namespace autofill |
OLD | NEW |