| 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 37ce12e1fb26877d2a9af8736d3c629781d2e0af..4f650670567b72260411a48fd81c933bc96b4ea0 100644
|
| --- a/chrome/test/base/ui_test_utils.cc
|
| +++ b/chrome/test/base/ui_test_utils.cc
|
| @@ -15,8 +15,8 @@
|
| #include "base/file_util.h"
|
| #include "base/files/file_path.h"
|
| #include "base/json/json_reader.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "base/message_loop/message_loop.h"
|
| #include "base/path_service.h"
|
| #include "base/prefs/pref_service.h"
|
| #include "base/strings/stringprintf.h"
|
| @@ -335,12 +335,13 @@ int FindInPage(WebContents* tab, const string16& search_string,
|
| void WaitForTemplateURLServiceToLoad(TemplateURLService* service) {
|
| if (service->loaded())
|
| return;
|
| -
|
| - content::WindowedNotificationObserver observer(
|
| - chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
|
| - content::Source<TemplateURLService>(service));
|
| + scoped_refptr<content::MessageLoopRunner> message_loop_runner =
|
| + new content::MessageLoopRunner;
|
| + scoped_ptr<TemplateURLService::Subscription> subscription =
|
| + service->RegisterOnLoadedCallback(
|
| + message_loop_runner->QuitClosure());
|
| service->Load();
|
| - observer.Wait();
|
| + message_loop_runner->Run();
|
|
|
| ASSERT_TRUE(service->loaded());
|
| }
|
|
|