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

Unified Diff: components/autofill/browser/autocheckout/whitelist_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: components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
diff --git a/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc b/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
index ea7c920783a77b9fe6c6094ce47d663e61f4ba4b..4fc3e6e6044d3f57b27904a4459655b884ecb474 100644
--- a/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
+++ b/components/autofill/browser/autocheckout/whitelist_manager_unittest.cc
@@ -9,7 +9,7 @@
#include "components/autofill/browser/autocheckout/whitelist_manager.h"
#include "components/autofill/browser/autofill_metrics.h"
#include "components/autofill/common/autofill_switches.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
@@ -90,16 +90,15 @@ class TestWhitelistManager : public WhitelistManager {
class WhitelistManagerTest : public testing::Test {
public:
- WhitelistManagerTest() : io_thread_(content::BrowserThread::IO) {}
+ WhitelistManagerTest()
+ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
virtual void SetUp() {
- io_thread_.StartIOThread();
profile_.CreateRequestContext();
}
virtual void TearDown() {
profile_.ResetRequestContext();
- io_thread_.Stop();
}
protected:
@@ -146,9 +145,7 @@ class WhitelistManagerTest : public testing::Test {
scoped_ptr<TestWhitelistManager> whitelist_manager_;
private:
- base::MessageLoopForIO message_loop_;
- // The profile's request context must be released on the IO thread.
- content::TestBrowserThread io_thread_;
+ content::TestBrowserThreadBundle thread_bundle_;
};
TEST_F(WhitelistManagerTest, DownloadWhitelist) {
« no previous file with comments | « chrome/test/base/chrome_render_view_host_test_harness.cc ('k') | components/autofill/browser/autocheckout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698