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

Side by Side Diff: net/cookies/cookie_store_unittest.h

Issue 1398973003: Don't use base::MessageLoop::{Quit,QuitClosure} in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « net/cookies/cookie_store_test_callbacks.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_COOKIES_COOKIE_STORE_UNITTEST_H_ 5 #ifndef NET_COOKIES_COOKIE_STORE_UNITTEST_H_
6 #define NET_COOKIES_COOKIE_STORE_UNITTEST_H_ 6 #define NET_COOKIES_COOKIE_STORE_UNITTEST_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 &ResultSavingCookieCallback<int>::Run, 209 &ResultSavingCookieCallback<int>::Run,
210 base::Unretained(&callback))); 210 base::Unretained(&callback)));
211 RunFor(kTimeout); 211 RunFor(kTimeout);
212 EXPECT_TRUE(callback.did_run()); 212 EXPECT_TRUE(callback.did_run());
213 return callback.result(); 213 return callback.result();
214 } 214 }
215 215
216 void RunFor(int ms) { 216 void RunFor(int ms) {
217 // Runs the test thread message loop for up to |ms| milliseconds. 217 // Runs the test thread message loop for up to |ms| milliseconds.
218 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 218 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
219 FROM_HERE, 219 FROM_HERE, base::Bind(&base::MessageLoop::QuitWhenIdle,
220 base::Bind(&base::MessageLoop::Quit, weak_factory_->GetWeakPtr()), 220 weak_factory_->GetWeakPtr()),
221 base::TimeDelta::FromMilliseconds(ms)); 221 base::TimeDelta::FromMilliseconds(ms));
222 base::MessageLoop::current()->Run(); 222 base::MessageLoop::current()->Run();
223 weak_factory_->InvalidateWeakPtrs(); 223 weak_factory_->InvalidateWeakPtrs();
224 } 224 }
225 225
226 scoped_refptr<CookieStore> GetCookieStore() { 226 scoped_refptr<CookieStore> GetCookieStore() {
227 return CookieStoreTestTraits::Create(); 227 return CookieStoreTestTraits::Create();
228 } 228 }
229 229
230 // Compares two cookie lines. 230 // Compares two cookie lines.
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 REGISTER_TYPED_TEST_CASE_P(MultiThreadedCookieStoreTest, 1200 REGISTER_TYPED_TEST_CASE_P(MultiThreadedCookieStoreTest,
1201 ThreadCheckGetCookies, 1201 ThreadCheckGetCookies,
1202 ThreadCheckGetCookiesWithOptions, 1202 ThreadCheckGetCookiesWithOptions,
1203 ThreadCheckSetCookieWithOptions, 1203 ThreadCheckSetCookieWithOptions,
1204 ThreadCheckDeleteCookie, 1204 ThreadCheckDeleteCookie,
1205 ThreadCheckDeleteSessionCookies); 1205 ThreadCheckDeleteSessionCookies);
1206 1206
1207 } // namespace net 1207 } // namespace net
1208 1208
1209 #endif // NET_COOKIES_COOKIE_STORE_UNITTEST_H_ 1209 #endif // NET_COOKIES_COOKIE_STORE_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_store_test_callbacks.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698