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

Unified Diff: chrome/test/chromedriver/commands_unittest.cc

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 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
« no previous file with comments | « chrome/test/chromedriver/commands.cc ('k') | chrome/test/chromedriver/net/net_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/commands_unittest.cc
diff --git a/chrome/test/chromedriver/commands_unittest.cc b/chrome/test/chromedriver/commands_unittest.cc
index b5320c2c979f2ce8ee51c52990275abc4411e382..a0e0a5e4a0440cce43f30adb25e02dfeff9c75f0 100644
--- a/chrome/test/chromedriver/commands_unittest.cc
+++ b/chrome/test/chromedriver/commands_unittest.cc
@@ -8,9 +8,10 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
+#include "base/location.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread.h"
#include "base/values.h"
@@ -218,7 +219,7 @@ TEST(CommandsTest, ExecuteSessionCommand) {
linked_ptr<base::Thread> thread(new base::Thread("1"));
ASSERT_TRUE(thread->Start());
std::string id("id");
- thread->message_loop()->PostTask(
+ thread->task_runner()->PostTask(
FROM_HERE,
base::Bind(&internal::CreateSessionOnSessionThreadForTesting, id));
map[id] = thread;
@@ -700,7 +701,7 @@ TEST(CommandsTest, SuccessNotifyingCommandListeners) {
linked_ptr<base::Thread> thread(new base::Thread("1"));
ASSERT_TRUE(thread->Start());
std::string id("id");
- thread->message_loop()->PostTask(
+ thread->task_runner()->PostTask(
FROM_HERE,
base::Bind(&internal::CreateSessionOnSessionThreadForTesting, id));
@@ -789,7 +790,7 @@ TEST(CommandsTest, ErrorNotifyingCommandListeners) {
linked_ptr<base::Thread> thread(new base::Thread("1"));
ASSERT_TRUE(thread->Start());
std::string id("id");
- thread->message_loop()->PostTask(
+ thread->task_runner()->PostTask(
FROM_HERE,
base::Bind(&internal::CreateSessionOnSessionThreadForTesting, id));
map[id] = thread;
@@ -798,9 +799,8 @@ TEST(CommandsTest, ErrorNotifyingCommandListeners) {
// was called before (as opposed to after) command execution. We don't need to
// verify this again, so we can just add |listener| with PostTask.
CommandListener* listener = new FailingCommandListener();
- thread->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&AddListenerToSessionIfSessionExists, listener));
+ thread->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&AddListenerToSessionIfSessionExists, listener));
base::DictionaryValue params;
// The command should never be executed if BeforeCommand fails for a listener.
@@ -818,7 +818,6 @@ TEST(CommandsTest, ErrorNotifyingCommandListeners) {
base::Bind(&OnFailBecauseErrorNotifyingListeners, &run_loop));
run_loop.Run();
- thread->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&VerifySessionWasDeleted));
+ thread->task_runner()->PostTask(FROM_HERE,
+ base::Bind(&VerifySessionWasDeleted));
}
« no previous file with comments | « chrome/test/chromedriver/commands.cc ('k') | chrome/test/chromedriver/net/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698