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

Unified Diff: content/browser/browser_thread_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 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: content/browser/browser_thread_unittest.cc
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc
index b54e20e441e883297d0f415582ea6e110c88fb77..bef2c9fd46040e6b4ea02abde7c9109e766d4aa4 100644
--- a/content/browser/browser_thread_unittest.cc
+++ b/content/browser/browser_thread_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/run_loop.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/single_thread_task_runner.h"
#include "content/browser/browser_thread_impl.h"
@@ -76,12 +77,12 @@ TEST_F(BrowserThreadTest, PostTask) {
BrowserThread::FILE,
FROM_HERE,
base::Bind(&BasicFunction, base::MessageLoop::current()));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(BrowserThreadTest, Release) {
BrowserThread::ReleaseSoon(BrowserThread::UI, FROM_HERE, this);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(BrowserThreadTest, ReleasedOnCorrectThread) {
@@ -89,7 +90,7 @@ TEST_F(BrowserThreadTest, ReleasedOnCorrectThread) {
scoped_refptr<DeletedOnFile> test(
new DeletedOnFile(base::MessageLoop::current()));
}
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(BrowserThreadTest, PostTaskViaTaskRunner) {
@@ -97,14 +98,14 @@ TEST_F(BrowserThreadTest, PostTaskViaTaskRunner) {
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE);
task_runner->PostTask(
FROM_HERE, base::Bind(&BasicFunction, base::MessageLoop::current()));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(BrowserThreadTest, ReleaseViaTaskRunner) {
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
task_runner->ReleaseSoon(FROM_HERE, this);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
TEST_F(BrowserThreadTest, PostTaskAndReply) {
@@ -114,7 +115,7 @@ TEST_F(BrowserThreadTest, PostTaskAndReply) {
BrowserThread::FILE, FROM_HERE, base::Bind(&base::DoNothing),
base::Bind(&base::MessageLoop::QuitWhenIdle,
base::Unretained(base::MessageLoop::current()->current()))));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
} // namespace content
« no previous file with comments | « content/browser/blob_storage/blob_url_request_job_unittest.cc ('k') | content/browser/byte_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698