| Index: chrome/browser/extensions/extension_omnibox_apitest.cc
|
| diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc
|
| index 15b3d733780c06cfa4e5164c9a4eb272f6b603e5..94baf6ff0a5b43172100392f2134ed8ad17f57b1 100644
|
| --- a/chrome/browser/extensions/extension_omnibox_apitest.cc
|
| +++ b/chrome/browser/extensions/extension_omnibox_apitest.cc
|
| @@ -9,9 +9,9 @@
|
| #include "chrome/browser/browser.h"
|
| #include "chrome/browser/browser_window.h"
|
| #include "chrome/browser/extensions/extension_apitest.h"
|
| -#include "chrome/browser/history/history.h"
|
| #include "chrome/browser/location_bar.h"
|
| #include "chrome/browser/profile.h"
|
| +#include "chrome/browser/search_engines/template_url_model.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/notification_type.h"
|
| #include "chrome/common/url_constants.h"
|
| @@ -44,11 +44,14 @@ class OmniboxApiTest : public ExtensionApiTest {
|
| autocomplete_controller();
|
| }
|
|
|
| - void WaitForHistoryBackendToLoad() {
|
| - HistoryService* history_service =
|
| - browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS);
|
| - if (!history_service->BackendLoaded())
|
| - ui_test_utils::WaitForNotification(NotificationType::HISTORY_LOADED);
|
| + void WaitForTemplateURLModelToLoad() {
|
| + TemplateURLModel* model =
|
| + browser()->profile()->GetTemplateURLModel();
|
| + model->Load();
|
| + if (!model->loaded()) {
|
| + ui_test_utils::WaitForNotification(
|
| + NotificationType::TEMPLATE_URL_MODEL_LOADED);
|
| + }
|
| }
|
|
|
| void WaitForAutocompleteDone(AutocompleteController* controller) {
|
| @@ -66,9 +69,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxApiTest, Basic) {
|
| ASSERT_TRUE(StartHTTPServer());
|
| ASSERT_TRUE(RunExtensionTest("omnibox")) << message_;
|
|
|
| - // The results depend on the history backend being loaded. Make sure it is
|
| + // The results depend on the TemplateURLModel being loaded. Make sure it is
|
| // loaded so that the autocomplete results are consistent.
|
| - WaitForHistoryBackendToLoad();
|
| + WaitForTemplateURLModelToLoad();
|
|
|
| LocationBar* location_bar = GetLocationBar();
|
| AutocompleteController* autocomplete_controller = GetAutocompleteController();
|
|
|