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

Unified Diff: chrome/browser/ui/autofill/account_chooser_model_unittest.cc

Issue 556173002: Ensure incognito TestingProfiles are incognito for their whole lifetime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 6 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 side-by-side diff with in-line comments
Download patch
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());
}
}

Powered by Google App Engine
This is Rietveld 408576698