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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. 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 unified diff | Download patch | Annotate | Revision Log
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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 content::Source<SearchProviderInstallDataTest>(this), 210 content::Source<SearchProviderInstallDataTest>(this),
211 content::NotificationService::NoDetails()); 211 content::NotificationService::NoDetails());
212 212
213 util_.TearDown(); 213 util_.TearDown();
214 testing::Test::TearDown(); 214 testing::Test::TearDown();
215 } 215 }
216 216
217 void SearchProviderInstallDataTest::SimulateDefaultSearchIsManaged( 217 void SearchProviderInstallDataTest::SimulateDefaultSearchIsManaged(
218 const std::string& url) { 218 const std::string& url) {
219 ASSERT_FALSE(url.empty()); 219 ASSERT_FALSE(url.empty());
220 TestingPrefService* service = util_.profile()->GetTestingPrefService(); 220 TestingPrefServiceSyncable* service =
221 util_.profile()->GetTestingPrefService();
221 service->SetManagedPref(prefs::kDefaultSearchProviderEnabled, 222 service->SetManagedPref(prefs::kDefaultSearchProviderEnabled,
222 Value::CreateBooleanValue(true)); 223 Value::CreateBooleanValue(true));
223 service->SetManagedPref(prefs::kDefaultSearchProviderSearchURL, 224 service->SetManagedPref(prefs::kDefaultSearchProviderSearchURL,
224 Value::CreateStringValue(url)); 225 Value::CreateStringValue(url));
225 service->SetManagedPref(prefs::kDefaultSearchProviderName, 226 service->SetManagedPref(prefs::kDefaultSearchProviderName,
226 Value::CreateStringValue("managed")); 227 Value::CreateStringValue("managed"));
227 // Clear the IDs that are not specified via policy. 228 // Clear the IDs that are not specified via policy.
228 service->SetManagedPref(prefs::kDefaultSearchProviderID, 229 service->SetManagedPref(prefs::kDefaultSearchProviderID,
229 new StringValue(std::string())); 230 new StringValue(std::string()));
230 service->SetManagedPref(prefs::kDefaultSearchProviderPrepopulateID, 231 service->SetManagedPref(prefs::kDefaultSearchProviderPrepopulateID,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Change the Google base url. 326 // Change the Google base url.
326 google_host = "foo.com"; 327 google_host = "foo.com";
327 util_.SetGoogleBaseURL(GURL("http://" + google_host + "/")); 328 util_.SetGoogleBaseURL(GURL("http://" + google_host + "/"));
328 // Wait for the I/O thread to process the update notification. 329 // Wait for the I/O thread to process the update notification.
329 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); 330 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests();
330 331
331 // Verify that the change got picked up. 332 // Verify that the change got picked up.
332 test_get_install_state->set_search_provider_host(google_host); 333 test_get_install_state->set_search_provider_host(google_host);
333 EXPECT_TRUE(test_get_install_state->RunTests()); 334 EXPECT_TRUE(test_get_install_state->RunTests());
334 } 335 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.cc ('k') | chrome/browser/search_engines/template_url_prepopulate_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698