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

Unified Diff: ui/aura/window_event_dispatcher_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
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurawin.cc ('k') | ui/base/x/selection_requestor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher_unittest.cc
diff --git a/ui/aura/window_event_dispatcher_unittest.cc b/ui/aura/window_event_dispatcher_unittest.cc
index f22a0ac7e0361e919e165f7e7190c19fc80e2fd6..e6ccbf1e5c716894c06ebb3f364e0db19347e59f 100644
--- a/ui/aura/window_event_dispatcher_unittest.cc
+++ b/ui/aura/window_event_dispatcher_unittest.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -2016,12 +2017,12 @@ class WindowEventDispatcherTestWithMessageLoop
std::unique_ptr<ui::MouseEvent> mouse(new ui::MouseEvent(
ui::ET_MOUSE_PRESSED, gfx::Point(10, 10), gfx::Point(10, 10),
ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE));
- message_loop()->PostTask(
+ message_loop()->task_runner()->PostTask(
FROM_HERE,
base::Bind(&WindowEventDispatcherTestWithMessageLoop::RepostEventHelper,
- host()->dispatcher(),
- base::Passed(&mouse)));
- message_loop()->PostTask(FROM_HERE, message_loop()->QuitWhenIdleClosure());
+ host()->dispatcher(), base::Passed(&mouse)));
+ message_loop()->task_runner()->PostTask(
+ FROM_HERE, message_loop()->QuitWhenIdleClosure());
base::MessageLoop::ScopedNestableTaskAllower allow(message_loop());
base::RunLoop loop;
@@ -2065,11 +2066,10 @@ TEST_F(WindowEventDispatcherTestWithMessageLoop, EventRepostedInNonNestedLoop) {
CHECK(!message_loop()->is_running());
// Perform the test in a callback, so that it runs after the message-loop
// starts.
- message_loop()->PostTask(
- FROM_HERE, base::Bind(
- &WindowEventDispatcherTestWithMessageLoop::RunTest,
- base::Unretained(this)));
- message_loop()->Run();
+ message_loop()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&WindowEventDispatcherTestWithMessageLoop::RunTest,
+ base::Unretained(this)));
+ base::RunLoop().Run();
}
class WindowEventDispatcherTestInHighDPI : public WindowEventDispatcherTest {
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurawin.cc ('k') | ui/base/x/selection_requestor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698