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

Unified Diff: chrome/browser/password_manager/password_generation_manager_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
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_generation_manager_unittest.cc
diff --git a/chrome/browser/password_manager/password_generation_manager_unittest.cc b/chrome/browser/password_manager/password_generation_manager_unittest.cc
index e9fce019ba0b065ed7fdf62d83549daeb322f97c..ac691d9cfec4dcd7e046f3002302093498f79752 100644
--- a/chrome/browser/password_manager/password_generation_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_generation_manager_unittest.cc
@@ -44,9 +44,6 @@ class TestPasswordGenerationManager : public PasswordGenerationManager {
class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
protected:
virtual void SetUp() OVERRIDE {
- TestingProfile* profile = CreateProfile();
- profile->CreateRequestContext();
- browser_context_.reset(profile);
SetThreadBundleOptions(content::TestBrowserThreadBundle::REAL_IO_THREAD);
ChromeRenderViewHostTestHarness::SetUp();
@@ -59,8 +56,10 @@ class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
ChromeRenderViewHostTestHarness::TearDown();
}
- virtual TestingProfile* CreateProfile() {
- return new TestingProfile();
+ virtual content::BrowserContext* CreateBrowserContext() OVERRIDE {
+ TestingProfile* profile = new TestingProfile();
+ profile->CreateRequestContext();
+ return profile;
}
void UpdateState(bool new_renderer) {
@@ -73,11 +72,12 @@ class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
class IncognitoPasswordGenerationManagerTest :
public PasswordGenerationManagerTest {
public:
- virtual TestingProfile* CreateProfile() OVERRIDE {
+ virtual content::BrowserContext* CreateBrowserContext() OVERRIDE {
// Create an incognito profile.
TestingProfile::Builder builder;
scoped_ptr<TestingProfile> profile = builder.Build();
profile->set_incognito(true);
+ profile->CreateRequestContext();
return profile.release();
}
};
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698