Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3337)

Unified Diff: chrome/browser/ui/search/search_delegate_unittest.cc

Issue 11415292: [Search] No longer reverting omnibox text on instant search (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix tests Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/search_delegate_unittest.cc
diff --git a/chrome/browser/ui/search/search_delegate_unittest.cc b/chrome/browser/ui/search/search_delegate_unittest.cc
index 45a5442a5abc1bef6c9dedfd007cbc07a8d32d5e..584b911c2dd2566e892391aab15515ab3688bf96 100644
--- a/chrome/browser/ui/search/search_delegate_unittest.cc
+++ b/chrome/browser/ui/search/search_delegate_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/search/search.h"
#include "chrome/browser/ui/search/search_model.h"
@@ -22,6 +23,11 @@ TEST_F(SearchDelegateTest, SearchModel) {
// Initial state.
EXPECT_TRUE(browser()->search_model()->mode().is_default());
+ // This must be created to make sure the SearchTabHelper has a non-NULL
+ // TemplateURLService when navigations are committed.
+ TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+ browser()->profile(), &TemplateURLServiceFactory::BuildInstanceFor);
+
// Propagate change from tab's search model to browser's search model.
AddTab(browser(), GURL("http://foo/0"));
content::WebContents* web_contents =

Powered by Google App Engine
This is Rietveld 408576698