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

Side by Side Diff: net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc

Issue 1496493004: Revert of Tests: Simplify SequencedWorkerPoolOwner, call Shutdown on destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" 5 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (!base::ReadFileToString(temp_dir_.path().Append(kCookieFilename), 189 if (!base::ReadFileToString(temp_dir_.path().Append(kCookieFilename),
190 &contents)) 190 &contents))
191 return std::string(); 191 return std::string();
192 return contents; 192 return contents;
193 } 193 }
194 194
195 void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } 195 void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
196 196
197 void TearDown() override { 197 void TearDown() override {
198 DestroyStore(); 198 DestroyStore();
199 pool_owner_->pool()->Shutdown();
199 } 200 }
200 201
201 protected: 202 protected:
202 scoped_ptr<base::SequencedWorkerPoolOwner> pool_owner_; 203 scoped_ptr<base::SequencedWorkerPoolOwner> pool_owner_;
203 base::WaitableEvent loaded_event_; 204 base::WaitableEvent loaded_event_;
204 base::WaitableEvent key_loaded_event_; 205 base::WaitableEvent key_loaded_event_;
205 base::WaitableEvent db_thread_event_; 206 base::WaitableEvent db_thread_event_;
206 CanonicalCookieVector cookies_; 207 CanonicalCookieVector cookies_;
207 base::ScopedTempDir temp_dir_; 208 base::ScopedTempDir temp_dir_;
208 scoped_refptr<SQLitePersistentCookieStore> store_; 209 scoped_refptr<SQLitePersistentCookieStore> store_;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 EXPECT_TRUE(was_called_with_no_cookies); 747 EXPECT_TRUE(was_called_with_no_cookies);
747 748
748 // Same with trying to load a specific cookie. 749 // Same with trying to load a specific cookie.
749 was_called_with_no_cookies = false; 750 was_called_with_no_cookies = false;
750 store_->LoadCookiesForKey("foo.bar", base::Bind(WasCalledWithNoCookies, 751 store_->LoadCookiesForKey("foo.bar", base::Bind(WasCalledWithNoCookies,
751 &was_called_with_no_cookies)); 752 &was_called_with_no_cookies));
752 EXPECT_TRUE(was_called_with_no_cookies); 753 EXPECT_TRUE(was_called_with_no_cookies);
753 } 754 }
754 755
755 } // namespace net 756 } // namespace net
OLDNEW
« no previous file with comments | « net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc ('k') | net/url_request/url_request_simple_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698