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

Unified Diff: ui/views/controls/menu/menu_controller_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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: ui/views/controls/menu/menu_controller_unittest.cc
diff --git a/ui/views/controls/menu/menu_controller_unittest.cc b/ui/views/controls/menu/menu_controller_unittest.cc
index 2c622a2e8842601d76e2df9e9b0d65fcccb70c7e..e43aa59cb585a8876f5d96c754f08e353e5081ae 100644
--- a/ui/views/controls/menu/menu_controller_unittest.cc
+++ b/ui/views/controls/menu/menu_controller_unittest.cc
@@ -612,10 +612,9 @@ class MenuControllerTest : public ViewsTestBase {
// Tests that an event targeter which blocks events will be honored by the menu
// event dispatcher.
TEST_F(MenuControllerTest, EventTargeter) {
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&MenuControllerTest::TestEventTargeter,
- base::Unretained(this)));
+ base::MessageLoopForUI::current()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&MenuControllerTest::TestEventTargeter,
+ base::Unretained(this)));
RunMenu();
}
#endif // defined(OS_LINUX) && defined(USE_X11)
@@ -636,17 +635,13 @@ TEST_F(MenuControllerTest, TouchIdsReleasedCorrectly) {
event_generator()->PressTouchId(1);
event_generator()->ReleaseTouchId(0);
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&MenuControllerTest::ReleaseTouchId,
- base::Unretained(this),
- 1));
+ base::MessageLoopForUI::current()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&MenuControllerTest::ReleaseTouchId,
+ base::Unretained(this), 1));
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&MenuControllerTest::PressKey,
- base::Unretained(this),
- ui::VKEY_ESCAPE));
+ base::MessageLoopForUI::current()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&MenuControllerTest::PressKey,
+ base::Unretained(this), ui::VKEY_ESCAPE));
RunMenu();
@@ -1357,7 +1352,7 @@ TEST_F(MenuControllerTest, NestedMessageLoopDiesWithNestedMenu) {
TEST_F(MenuControllerTest, SynchronousCancelEvent) {
ExitMenuRun();
// Post actual test to run once the menu has created a nested message loop.
- base::MessageLoopForUI::current()->PostTask(
+ base::MessageLoopForUI::current()->task_runner()->PostTask(
FROM_HERE,
base::Bind(&MenuControllerTest::TestCancelEvent, base::Unretained(this)));
int mouse_event_flags = 0;
« no previous file with comments | « ui/shell_dialogs/select_file_dialog_win.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698