Chromium Code Reviews| Index: chrome/test/base/ui_test_utils.cc |
| diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc |
| index e4097e7a3edd7c1bea3d04ff65f634d7c0fb62d6..ffce5f3a9b59df0259b8a048c1b6969bb993ea9d 100644 |
| --- a/chrome/test/base/ui_test_utils.cc |
| +++ b/chrome/test/base/ui_test_utils.cc |
| @@ -356,12 +356,12 @@ void WaitForTemplateURLServiceToLoad(TemplateURLService* service) { |
| if (service->loaded()) |
| return; |
| - content::WindowedNotificationObserver observer( |
| - chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED, |
| - content::Source<TemplateURLService>(service)); |
| + base::RunLoop run_loop; |
| + scoped_ptr<TemplateURLService::Subscription> sub = |
| + service->RegisterOnLoadedCallback( |
| + content::GetQuitTaskForRunLoop(&run_loop)); |
| service->Load(); |
| - observer.Wait(); |
| - |
| + content::RunThisRunLoop(&run_loop); |
|
Avi (use Gerrit)
2013/10/02 22:27:52
MessageLoopRunner
Cait (Slow)
2013/10/03 15:36:45
Done.
|
| ASSERT_TRUE(service->loaded()); |
| } |