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

Unified Diff: content/public/test/test_utils.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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/public/test/test_utils.cc
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc
index ab0fcd61309e861734e834eec1e0bc01a29b19ef..6c318c3742c10b00c6d5625bfe9cf6079d3b375e 100644
--- a/content/public/test/test_utils.cc
+++ b/content/public/test/test_utils.cc
@@ -34,7 +34,8 @@ static void DeferredQuitRunLoop(const base::Closure& quit_task,
if (num_quit_deferrals <= 0) {
quit_task.Run();
} else {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&DeferredQuitRunLoop, quit_task, num_quit_deferrals - 1));
}
}
@@ -63,7 +64,7 @@ class ScriptCallback {
void ScriptCallback::ResultCallback(const base::Value* result) {
if (result)
result_.reset(result->DeepCopy());
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
} // namespace
@@ -74,7 +75,8 @@ void RunMessageLoop() {
}
void RunThisRunLoop(base::RunLoop* run_loop) {
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
// If we're running inside a browser test, we might need to allow the test
// launcher to do extra work before/after running a nested message loop.
@@ -90,8 +92,8 @@ void RunThisRunLoop(base::RunLoop* run_loop) {
}
void RunAllPendingInMessageLoop() {
- MessageLoop::current()->PostTask(FROM_HERE,
- MessageLoop::QuitWhenIdleClosure());
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
RunMessageLoop();
}
@@ -127,7 +129,7 @@ scoped_ptr<base::Value> ExecuteScriptAndGetValue(
string16(), // frame_xpath,
UTF8ToUTF16(script),
base::Bind(&ScriptCallback::ResultCallback, base::Unretained(&observer)));
- MessageLoop* loop = MessageLoop::current();
+ base::MessageLoop* loop = base::MessageLoop::current();
loop->Run();
return observer.result().Pass();
}
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/renderer/accessibility/renderer_accessibility_complete.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698