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

Unified Diff: chrome/browser/password_manager/password_generation_manager_unittest.cc

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 years, 6 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/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 3f4a75e428219d96b4879cb02f149cdb8e3fd2d4..e9fce019ba0b065ed7fdf62d83549daeb322f97c 100644
--- a/chrome/browser/password_manager/password_generation_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_generation_manager_unittest.cc
@@ -42,19 +42,14 @@ class TestPasswordGenerationManager : public PasswordGenerationManager {
};
class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
- public:
- PasswordGenerationManagerTest()
- : ChromeRenderViewHostTestHarness(),
- ui_thread_(content::BrowserThread::UI, &message_loop_),
- io_thread_(content::BrowserThread::IO) {}
-
+ protected:
virtual void SetUp() OVERRIDE {
TestingProfile* profile = CreateProfile();
profile->CreateRequestContext();
browser_context_.reset(profile);
+ SetThreadBundleOptions(content::TestBrowserThreadBundle::REAL_IO_THREAD);
ChromeRenderViewHostTestHarness::SetUp();
- io_thread_.StartIOThread();
password_generation_manager_.reset(
new TestPasswordGenerationManager(web_contents()));
@@ -72,10 +67,6 @@ class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
password_generation_manager_->UpdateState(NULL, new_renderer);
}
- protected:
- content::TestBrowserThread ui_thread_;
- content::TestBrowserThread io_thread_;
-
scoped_ptr<TestPasswordGenerationManager> password_generation_manager_;
};

Powered by Google App Engine
This is Rietveld 408576698