| 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/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 using base::ASCIIToUTF16; | 
 |   15  | 
|   14 namespace autofill { |   16 namespace autofill { | 
|   15  |   17  | 
|   16 namespace { |   18 namespace { | 
|   17  |   19  | 
|   18 class TestAccountChooserModel : public AccountChooserModel { |   20 class TestAccountChooserModel : public AccountChooserModel { | 
|   19  public: |   21  public: | 
|   20   TestAccountChooserModel(AccountChooserModelDelegate* delegate, |   22   TestAccountChooserModel(AccountChooserModelDelegate* delegate, | 
|   21                           Profile* profile, |   23                           Profile* profile, | 
|   22                           bool disable_wallet, |   24                           bool disable_wallet, | 
|   23                           const AutofillMetrics& metric_logger) |   25                           const AutofillMetrics& metric_logger) | 
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  217   EXPECT_EQ(ASCIIToUTF16(accounts[1]), model()->GetActiveWalletAccountName()); |  219   EXPECT_EQ(ASCIIToUTF16(accounts[1]), model()->GetActiveWalletAccountName()); | 
|  218  |  220  | 
|  219   // Setting the wallet accounts forces the switch to wallet. |  221   // Setting the wallet accounts forces the switch to wallet. | 
|  220   model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0); |  222   model()->ExecuteCommand(TestAccountChooserModel::kAutofillItemId, 0); | 
|  221   EXPECT_FALSE(model()->WalletIsSelected()); |  223   EXPECT_FALSE(model()->WalletIsSelected()); | 
|  222   model()->SetWalletAccounts(accounts, 1U); |  224   model()->SetWalletAccounts(accounts, 1U); | 
|  223   EXPECT_TRUE(model()->WalletIsSelected()); |  225   EXPECT_TRUE(model()->WalletIsSelected()); | 
|  224 } |  226 } | 
|  225  |  227  | 
|  226 }  // namespace autofill |  228 }  // namespace autofill | 
| OLD | NEW |