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

Unified Diff: components/autofill/core/browser/autofill_metrics_unittest.cc

Issue 18068017: Change RenderViewHostTestHarness to create BrowserContext after thread startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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: components/autofill/core/browser/autofill_metrics_unittest.cc
diff --git a/components/autofill/core/browser/autofill_metrics_unittest.cc b/components/autofill/core/browser/autofill_metrics_unittest.cc
index 7471364c3484960fe7d4b946588ce2623f6db640..c099ebe0cb723de72e9f5f407cef31095d17047c 100644
--- a/components/autofill/core/browser/autofill_metrics_unittest.cc
+++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
@@ -282,20 +282,18 @@ AutofillMetricsTest::~AutofillMetricsTest() {
}
void AutofillMetricsTest::SetUp() {
- TestingProfile* profile = new TestingProfile();
+ ChromeRenderViewHostTestHarness::SetUp();
// Ensure Mac OS X does not pop up a modal dialog for the Address Book.
- autofill::test::DisableSystemServices(profile);
+ autofill::test::DisableSystemServices(profile());
- profile->CreateRequestContext();
- browser_context_.reset(profile);
- PersonalDataManagerFactory::GetInstance()->SetTestingFactory(profile, NULL);
+ profile()->CreateRequestContext();
+ PersonalDataManagerFactory::GetInstance()->SetTestingFactory(profile(), NULL);
- ChromeRenderViewHostTestHarness::SetUp();
TabAutofillManagerDelegate::CreateForWebContents(web_contents());
personal_data_.reset(new TestPersonalDataManager());
- personal_data_->SetBrowserContext(profile);
+ personal_data_->SetBrowserContext(profile());
autofill_driver_.reset(new TestAutofillDriver(web_contents()));
autofill_manager_.reset(new TestAutofillManager(
autofill_driver_.get(),

Powered by Google App Engine
This is Rietveld 408576698