Index: chrome/browser/ui/autofill/account_chooser_model_unittest.cc |
diff --git a/chrome/browser/ui/autofill/account_chooser_model_unittest.cc b/chrome/browser/ui/autofill/account_chooser_model_unittest.cc |
index a4d44deaafc2702a1c7579f0ec4e263964ada037..ea01c1feb2ebea1dbd04d482b75a1dba5d8a78b1 100644 |
--- a/chrome/browser/ui/autofill/account_chooser_model_unittest.cc |
+++ b/chrome/browser/ui/autofill/account_chooser_model_unittest.cc |
@@ -95,19 +95,14 @@ TEST_F(AccountChooserModelTest, ObeysPref) { |
} |
// In incognito, use local data regardless of the pref. |
{ |
- TestingProfile::Builder builder; |
- builder.SetIncognito(); |
- scoped_ptr<TestingProfile> incognito = builder.Build(); |
- incognito->SetOriginalProfile(profile()); |
+ Profile* incognito = profile()->GetOffTheRecordProfile(); |
profile()->GetPrefs()->SetBoolean( |
::prefs::kAutofillDialogPayWithoutWallet, false); |
incognito->GetPrefs()->SetBoolean( |
::prefs::kAutofillDialogPayWithoutWallet, false); |
- TestAccountChooserModel model(delegate(), |
- incognito.get(), |
- false, |
- metric_logger()); |
+ TestAccountChooserModel model( |
+ delegate(), incognito, false, metric_logger()); |
EXPECT_FALSE(model.WalletIsSelected()); |
} |
} |