Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
index d8887c24ed9b9d890d4dffa8d70174181658113f..feeebac4a02cc80b346dc8d83c1f5a7eca0ad1b6 100644 |
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
@@ -5,9 +5,14 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
+#include "base/location.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/prefs/pref_service.h" |
+#include "base/run_loop.h" |
+#include "base/single_thread_task_runner.h" |
msw
2015/06/12 00:31:21
nit: remove sttr and ttrh headers.
Sami
2015/06/12 10:56:22
Done.
|
#include "base/strings/string_number_conversions.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/thread_task_runner_handle.h" |
#include "chrome/app/chrome_command_ids.h" |
#include "chrome/browser/bookmarks/bookmark_model_factory.h" |
#include "chrome/browser/chrome_content_browser_client.h" |
@@ -315,7 +320,7 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase { |
base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); |
base::MessageLoopForUI::ScopedNestableTaskAllower allow_nested(loop); |
base::RunLoop run_loop; |
- loop->PostTask(FROM_HERE, run_loop.QuitClosure()); |
+ loop->task_runner()->PostTask(FROM_HERE, run_loop.QuitClosure()); |
run_loop.Run(); |
ViewEventTestBase::TearDown(); |
@@ -584,7 +589,7 @@ class BookmarkContextMenuNotificationObserver |
void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) override { |
- base::MessageLoop::current()->PostTask(FROM_HERE, task_); |
+ base::MessageLoop::current()->task_runner()->PostTask(FROM_HERE, task_); |
} |
// Sets the task that is posted when the context menu is shown. |
@@ -1015,9 +1020,8 @@ class BookmarkBarViewTest9 : public BookmarkBarViewEventTestBase { |
} |
void Step3() { |
- base::MessageLoop::current()->PostDelayedTask( |
- FROM_HERE, |
- base::Bind(&BookmarkBarViewTest9::Step4, this), |
+ base::MessageLoop::current()->task_runner()->PostDelayedTask( |
+ FROM_HERE, base::Bind(&BookmarkBarViewTest9::Step4, this), |
base::TimeDelta::FromMilliseconds(200)); |
} |
@@ -1032,7 +1036,7 @@ class BookmarkBarViewTest9 : public BookmarkBarViewEventTestBase { |
// On linux, Cancelling menu will call Quit on the message loop, |
// which can interfere with Done. We need to run Done in the |
// next execution loop. |
- base::MessageLoop::current()->PostTask( |
+ base::MessageLoop::current()->task_runner()->PostTask( |
FROM_HERE, base::Bind(&ViewEventTestBase::Done, this)); |
} |
@@ -1315,10 +1319,9 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase { |
tab_waiter.WaitForTab(); |
// For some reason return isn't processed correctly unless we delay. |
- base::MessageLoop::current()->PostDelayedTask( |
- FROM_HERE, |
- base::Bind( |
- &BookmarkBarViewTest12::Step5, this, base::Unretained(dialog)), |
+ base::MessageLoop::current()->task_runner()->PostDelayedTask( |
+ FROM_HERE, base::Bind(&BookmarkBarViewTest12::Step5, this, |
+ base::Unretained(dialog)), |
base::TimeDelta::FromSeconds(1)); |
} |
@@ -1581,7 +1584,7 @@ class BookmarkBarViewTest16 : public BookmarkBarViewEventTestBase { |
window_->Close(); |
window_ = NULL; |
- base::MessageLoop::current()->PostTask( |
+ base::MessageLoop::current()->task_runner()->PostTask( |
FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest16::Done)); |
} |
}; |