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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 1640503002: ash: Do not use MessageLoopForUI when not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 54cbb9da5810d1ae35394299c5a98c14360afdf6..a72c77ebf1eac432ba783a01c0e317e92fdc014d 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -37,6 +37,7 @@
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/user_action_tester.h"
+#include "base/thread_task_runner_handle.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/focus_client.h"
@@ -1192,10 +1193,11 @@ TEST_F(WindowSelectorTest, DISABLED_DragDropInProgress) {
ash::DragDropController* drag_drop_controller =
shell_test_api.drag_drop_controller();
ui::OSExchangeData data;
- base::MessageLoopForUI::current()->PostTask(FROM_HERE,
- base::Bind(&WindowSelectorTest::ToggleOverview,
- base::Unretained(this)));
- base::MessageLoopForUI::current()->PostTask(FROM_HERE,
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(&WindowSelectorTest::ToggleOverview, base::Unretained(this)));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
base::Bind(&CancelDrag, drag_drop_controller, &drag_canceled_by_test));
data.SetString(base::UTF8ToUTF16("I am being dragged"));
drag_drop_controller->StartDragAndDrop(data, window->GetRootWindow(),

Powered by Google App Engine
This is Rietveld 408576698