Commit 5841e0f2 authored by atwilson@chromium.org's avatar atwilson@chromium.org

Fix valgrind-reported leak by creating an IO thread.

URLRequestContextGetter requires an IO thread to free itself, so create a fake
thread.

TBR=mnissler
BUG=141123


Review URL: https://chromiumcodereview.appspot.com/10855158

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151671 0039d316-1c4b-4281-b951-d872f2087c98
parent c7d7fc7c
......@@ -38,7 +38,8 @@ class UserPolicySigninServiceTest : public testing::Test {
UserPolicySigninServiceTest()
: loop_(MessageLoop::TYPE_UI),
ui_thread_(content::BrowserThread::UI, &loop_),
file_thread_(content::BrowserThread::FILE, &loop_) {}
file_thread_(content::BrowserThread::FILE, &loop_),
io_thread_(content::BrowserThread::IO, &loop_) {}
virtual void SetUp() OVERRIDE {
g_browser_process->browser_policy_connector()->Init();
......@@ -84,11 +85,12 @@ class UserPolicySigninServiceTest : public testing::Test {
// UserCloudPolicyManager.
MockCloudPolicyStore* mock_store_;
// BrowserPolicyConnector wants to initialize various components
// asynchronously via tasks, so create a fake thread here.
// BrowserPolicyConnector and UrlFetcherFactory want to initialize and free
// various components asynchronously via tasks, so create fake threads here.
MessageLoop loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
content::TestBrowserThread io_thread_;
scoped_ptr<TestingPrefService> local_state_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment