Index: ui/aura/test/ui_controls_factory_aurawin.cc |
diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc |
index ae8d41543c99e46778a79f7b0165a47b33021142..7d1d2bbe4ef0775eb35aebeb574398c83168822e 100644 |
--- a/ui/aura/test/ui_controls_factory_aurawin.cc |
+++ b/ui/aura/test/ui_controls_factory_aurawin.cc |
@@ -6,6 +6,7 @@ |
#include "base/macros.h" |
#include "base/message_loop/message_loop.h" |
#include "base/single_thread_task_runner.h" |
+#include "base/threading/thread_task_runner_handle.h" |
#include "ui/aura/test/ui_controls_factory_aura.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_tree_host.h" |
@@ -77,8 +78,8 @@ class UIControlsWin : public UIControlsAura { |
void RunClosureAfterAllPendingUIEvents( |
const base::Closure& closure) override { |
// On windows, posting UI events is synchronous so just post the closure. |
- base::MessageLoopForUI::current()->task_runner()->PostTask(FROM_HERE, |
- closure); |
+ DCHECK(base::MessageLoopForUI::IsCurrent()); |
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); |
} |
private: |