diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 00:15:49 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 00:15:49 +0000 |
commit | a0ef9e131a03fb76aa9b59b4123ceb05bb366cc0 (patch) | |
tree | f400e8a3f4a21bcbc964a8c3094639b83049151c /chrome/browser/cookies_tree_model_unittest.cc | |
parent | 16c2bca118c971f0261252ee970fd27148a7f506 (diff) | |
download | chromium_src-a0ef9e131a03fb76aa9b59b4123ceb05bb366cc0.zip chromium_src-a0ef9e131a03fb76aa9b59b4123ceb05bb366cc0.tar.gz chromium_src-a0ef9e131a03fb76aa9b59b4123ceb05bb366cc0.tar.bz2 |
Spellchecker: Always destruct url request context getter on io thread.
To do this, we have to initiate downloads on the UI thread and don't hold onto a reference in the file thread.
BUG=27667
Review URL: http://codereview.chromium.org/387055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cookies_tree_model_unittest.cc')
-rw-r--r-- | chrome/browser/cookies_tree_model_unittest.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc index 43575f5..199dcaf 100644 --- a/chrome/browser/cookies_tree_model_unittest.cc +++ b/chrome/browser/cookies_tree_model_unittest.cc @@ -50,10 +50,14 @@ class CookieTestingProfile : public TestingProfile { scoped_refptr<URLRequestContextGetter> url_request_context_getter_; }; - - class CookiesTreeModelTest : public testing::Test { public: + CookiesTreeModelTest() : io_thread_(ChromeThread::IO, &message_loop_) { + } + + virtual ~CookiesTreeModelTest() { + } + virtual void SetUp() { profile_.reset(new CookieTestingProfile()); } @@ -109,11 +113,12 @@ class CookiesTreeModelTest : public testing::Test { delete parent_node->GetModel()->Remove(parent_node, ct_node_index); } protected: - MessageLoopForUI message_loop_; + MessageLoop message_loop_; + ChromeThread io_thread_; + scoped_ptr<CookieTestingProfile> profile_; }; - TEST_F(CookiesTreeModelTest, RemoveAll) { net::CookieMonster* monster = profile_->GetCookieMonster(); monster->SetCookie(GURL("http://foo"), "A=1"); |