summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_omnibox_apitest.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 18:13:33 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 18:13:33 +0000
commit8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142 (patch)
tree969478be1a6f6bf4905f7a95c5bdef91a897b1eb /chrome/browser/extensions/extension_omnibox_apitest.cc
parentce829a60f9df9ca9655f467cdb87dd4b1604fcc1 (diff)
downloadchromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.zip
chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.gz
chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.bz2
Changes TemplateURLModel into TemplateURLService. Changes all access points to go through the newly made ProfileKeyedServiceFactory subclass.
In addition, makes further modifications to the unit testing stuff because the TemplateURL tests change the active TemplateURLService on a profile during the test. BUG=77155 TEST=unit tests R=mirandac Review URL: http://codereview.chromium.org/7056056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_omnibox_apitest.cc')
-rw-r--r--chrome/browser/extensions/extension_omnibox_apitest.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc
index 38bac82..f66c48e 100644
--- a/chrome/browser/extensions/extension_omnibox_apitest.cc
+++ b/chrome/browser/extensions/extension_omnibox_apitest.cc
@@ -13,7 +13,8 @@
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
-#include "chrome/browser/search_engines/template_url_model.h"
+#include "chrome/browser/search_engines/template_url_service.h"
+#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
@@ -61,13 +62,13 @@ class OmniboxApiTest : public ExtensionApiTest {
autocomplete_controller();
}
- void WaitForTemplateURLModelToLoad() {
- TemplateURLModel* model =
- browser()->profile()->GetTemplateURLModel();
+ void WaitForTemplateURLServiceToLoad() {
+ TemplateURLService* model =
+ TemplateURLServiceFactory::GetForProfile(browser()->profile());
model->Load();
if (!model->loaded()) {
ui_test_utils::WaitForNotification(
- NotificationType::TEMPLATE_URL_MODEL_LOADED);
+ NotificationType::TEMPLATE_URL_SERVICE_LOADED);
}
}
@@ -91,9 +92,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxApiTest, MAYBE_Basic) {
ASSERT_TRUE(test_server()->Start());
ASSERT_TRUE(RunExtensionTest("omnibox")) << message_;
- // The results depend on the TemplateURLModel being loaded. Make sure it is
+ // The results depend on the TemplateURLService being loaded. Make sure it is
// loaded so that the autocomplete results are consistent.
- WaitForTemplateURLModelToLoad();
+ WaitForTemplateURLServiceToLoad();
LocationBar* location_bar = GetLocationBar();
AutocompleteController* autocomplete_controller = GetAutocompleteController();