Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chrome/browser/ui/autofill/account_chooser_model_unittest.cc

Issue 23537014: rAc: Get rid of dialog type in rAc, there is only one type left now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/core/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,
21 PrefService* prefs, 21 PrefService* prefs,
22 const AutofillMetrics& metric_logger) 22 const AutofillMetrics& metric_logger)
23 : AccountChooserModel(delegate, prefs, metric_logger, 23 : AccountChooserModel(delegate, prefs, metric_logger) {}
24 DIALOG_TYPE_REQUEST_AUTOCOMPLETE) {}
25 virtual ~TestAccountChooserModel() {} 24 virtual ~TestAccountChooserModel() {}
26 25
27 using AccountChooserModel::kActiveWalletItemId; 26 using AccountChooserModel::kActiveWalletItemId;
28 using AccountChooserModel::kAutofillItemId; 27 using AccountChooserModel::kAutofillItemId;
29 28
30 private: 29 private:
31 DISALLOW_COPY_AND_ASSIGN(TestAccountChooserModel); 30 DISALLOW_COPY_AND_ASSIGN(TestAccountChooserModel);
32 }; 31 };
33 32
34 class MockAccountChooserModelDelegate : public AccountChooserModelDelegate { 33 class MockAccountChooserModelDelegate : public AccountChooserModelDelegate {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 EXPECT_CALL(*delegate(), AccountChoiceChanged()).Times(2); 148 EXPECT_CALL(*delegate(), AccountChoiceChanged()).Times(2);
150 149
151 model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0); 150 model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0);
152 EXPECT_FALSE(model()->WalletIsSelected()); 151 EXPECT_FALSE(model()->WalletIsSelected());
153 152
154 model()->ExecuteCommand(TestAccountChooserModel::kActiveWalletItemId, 0); 153 model()->ExecuteCommand(TestAccountChooserModel::kActiveWalletItemId, 0);
155 EXPECT_TRUE(model()->WalletIsSelected()); 154 EXPECT_TRUE(model()->WalletIsSelected());
156 } 155 }
157 156
158 } // namespace autofill 157 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/account_chooser_model.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698