Index: chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc b/chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc |
index 8d1e3529f05f05cc0657919cf3da401b17607af4..472d8debcc465832350874ec618625d0f403651b 100644 |
--- a/chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc |
+++ b/chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc |
@@ -6,6 +6,7 @@ |
#include "base/location.h" |
#include "base/message_loop/message_loop.h" |
#include "base/single_thread_task_runner.h" |
+#include "base/threading/thread_task_runner_handle.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/chromeos/input_method/input_method_persistence.h" |
#include "chrome/browser/chromeos/language_preferences.h" |
@@ -54,11 +55,13 @@ class FocusPODWaiter { |
} |
void OnFocusPOD() { |
+ ASSERT_TRUE(base::MessageLoopForUI::IsCurrent()); |
focused_ = true; |
- if (runner_.get()) |
- base::MessageLoopForUI::current()->task_runner()->PostTask( |
+ if (runner_.get()) { |
+ base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, |
base::Bind(&FocusPODWaiter::ExitMessageLoop, base::Unretained(this))); |
+ } |
} |
void ExitMessageLoop() { runner_->Quit(); } |