| Index: extensions/test/extension_test_notification_observer.cc
|
| diff --git a/extensions/test/extension_test_notification_observer.cc b/extensions/test/extension_test_notification_observer.cc
|
| index 0e4d75d0ccdcbfa8cfe6e07dfb27c4b3ab52ef06..a1767e363487a85b40f62d1bd2fbaba29adec342 100644
|
| --- a/extensions/test/extension_test_notification_observer.cc
|
| +++ b/extensions/test/extension_test_notification_observer.cc
|
| @@ -140,6 +140,8 @@ void ExtensionTestNotificationObserver::Watch(
|
|
|
| void ExtensionTestNotificationObserver::Wait() {
|
| observer_->Wait();
|
| + // TODO(...): Find out why tests fail without it.
|
| + // content::RunAllPendingInMessageLoop();
|
|
|
| registrar_.RemoveAll();
|
| observer_.reset();
|
| @@ -187,16 +189,15 @@ void ExtensionTestNotificationObserver::WaitForCondition(
|
| return;
|
| condition_ = condition;
|
|
|
| - scoped_refptr<content::MessageLoopRunner> runner(
|
| - new content::MessageLoopRunner);
|
| - quit_closure_ = runner->QuitClosure();
|
| + base::RunLoop run_loop;
|
| + quit_closure_ = run_loop.QuitClosure();
|
|
|
| std::unique_ptr<base::CallbackList<void()>::Subscription> subscription;
|
| if (notification_set) {
|
| subscription = notification_set->callback_list().Add(base::Bind(
|
| &ExtensionTestNotificationObserver::MaybeQuit, base::Unretained(this)));
|
| }
|
| - runner->Run();
|
| + run_loop.Run();
|
|
|
| condition_.Reset();
|
| quit_closure_.Reset();
|
|
|