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, |
ncarter (slow)
2016/06/22 20:51:08
Shouldn't this use a QuitWhenIdleClosure from the
fdoray
2016/06/28 20:40:35
Yes, but it's not trivial to automate this change.
|
base::Unretained(base::MessageLoop::current()->current())))); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
} |
} // namespace content |