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

Side by Side Diff: chrome/browser/search_engines/template_url_service_unittest.cc

Issue 340553005: Stop depending on TemplateURLService from DefaultSearchManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search_engines/template_url_service_sync_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 227
228 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTest); 228 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTest);
229 }; 229 };
230 230
231 class TemplateURLServiceWithoutFallbackTest : public TemplateURLServiceTest { 231 class TemplateURLServiceWithoutFallbackTest : public TemplateURLServiceTest {
232 public: 232 public:
233 TemplateURLServiceWithoutFallbackTest() : TemplateURLServiceTest() {} 233 TemplateURLServiceWithoutFallbackTest() : TemplateURLServiceTest() {}
234 234
235 virtual void SetUp() OVERRIDE { 235 virtual void SetUp() OVERRIDE {
236 TemplateURLService::set_fallback_search_engines_disabled(true); 236 DefaultSearchManager::SetFallbackSearchEnginesDisabledForTesting(true);
237 TemplateURLServiceTest::SetUp(); 237 TemplateURLServiceTest::SetUp();
238 } 238 }
239 239
240 virtual void TearDown() OVERRIDE { 240 virtual void TearDown() OVERRIDE {
241 TemplateURLServiceTest::TearDown(); 241 TemplateURLServiceTest::TearDown();
242 TemplateURLService::set_fallback_search_engines_disabled(false); 242 DefaultSearchManager::SetFallbackSearchEnginesDisabledForTesting(false);
243 } 243 }
244 }; 244 };
245 245
246 TemplateURLServiceTest::TemplateURLServiceTest() { 246 TemplateURLServiceTest::TemplateURLServiceTest() {
247 } 247 }
248 248
249 void TemplateURLServiceTest::SetUp() { 249 void TemplateURLServiceTest::SetUp() {
250 test_util_.SetUp(); 250 test_util_.SetUp();
251 } 251 }
252 252
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 scoped_ptr<AssociatedExtensionInfo> extension_info( 1566 scoped_ptr<AssociatedExtensionInfo> extension_info(
1567 new AssociatedExtensionInfo); 1567 new AssociatedExtensionInfo);
1568 extension_info->wants_to_be_default_engine = true; 1568 extension_info->wants_to_be_default_engine = true;
1569 extension_info->extension_id = "ext1"; 1569 extension_info->extension_id = "ext1";
1570 model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass()); 1570 model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass());
1571 EXPECT_EQ(ext_dse, model()->GetTemplateURLForKeyword(ASCIIToUTF16("ext1"))); 1571 EXPECT_EQ(ext_dse, model()->GetTemplateURLForKeyword(ASCIIToUTF16("ext1")));
1572 EXPECT_TRUE(model()->is_default_search_managed()); 1572 EXPECT_TRUE(model()->is_default_search_managed());
1573 actual_managed_default = model()->GetDefaultSearchProvider(); 1573 actual_managed_default = model()->GetDefaultSearchProvider();
1574 ExpectSimilar(expected_managed_default.get(), actual_managed_default); 1574 ExpectSimilar(expected_managed_default.get(), actual_managed_default);
1575 } 1575 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_sync_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698