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

Unified Diff: ash/shell_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/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index f74fdb0f07a9c3d95ed04bd2796d810f45ce3fdf..74d29bfb9782c97efc049f5f3adb2032963266b0 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -23,6 +23,7 @@
#include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/window_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
@@ -361,9 +362,9 @@ TEST_F(ShellTest, LockScreenClosesActiveMenu) {
// When MenuRunner runs a nested loop the LockScreenAndVerifyMenuClosed
// command will fire, check the menu state and ensure the nested menu loop
// is exited so that the test will terminate.
- base::MessageLoopForUI::current()->PostTask(FROM_HERE,
- base::Bind(&ShellTest::LockScreenAndVerifyMenuClosed,
- base::Unretained(this)));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ShellTest::LockScreenAndVerifyMenuClosed,
+ base::Unretained(this)));
EXPECT_EQ(views::MenuRunner::NORMAL_EXIT,
menu_runner->RunMenuAt(widget,

Powered by Google App Engine
This is Rietveld 408576698