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

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store_unittest.cc

Issue 6174002: Makes the instant url managed by group policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: configuration_policy_pref_store.cc Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/file_path.h" 5 #include "base/file_path.h"
6 #include "chrome/browser/policy/configuration_policy_pref_store.h" 6 #include "chrome/browser/policy/configuration_policy_pref_store.h"
7 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 7 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
8 #include "chrome/browser/prefs/proxy_prefs.h" 8 #include "chrome/browser/prefs/proxy_prefs.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/notification_service.h" 10 #include "chrome/common/notification_service.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 store.GetValue(prefs::kDefaultSearchProviderSuggestURL, &value)); 387 store.GetValue(prefs::kDefaultSearchProviderSuggestURL, &value));
388 EXPECT_TRUE(StringValue(std::string()).Equals(value)); 388 EXPECT_TRUE(StringValue(std::string()).Equals(value));
389 389
390 EXPECT_EQ(PrefStore::READ_OK, 390 EXPECT_EQ(PrefStore::READ_OK,
391 store.GetValue(prefs::kDefaultSearchProviderIconURL, &value)); 391 store.GetValue(prefs::kDefaultSearchProviderIconURL, &value));
392 EXPECT_TRUE(StringValue(std::string()).Equals(value)); 392 EXPECT_TRUE(StringValue(std::string()).Equals(value));
393 393
394 EXPECT_EQ(PrefStore::READ_OK, 394 EXPECT_EQ(PrefStore::READ_OK,
395 store.GetValue(prefs::kDefaultSearchProviderEncodings, &value)); 395 store.GetValue(prefs::kDefaultSearchProviderEncodings, &value));
396 EXPECT_TRUE(StringValue(std::string()).Equals(value)); 396 EXPECT_TRUE(StringValue(std::string()).Equals(value));
397
398 EXPECT_EQ(PrefStore::READ_OK,
399 store.GetValue(prefs::kDefaultSearchProviderInstantURL, &value));
400 EXPECT_TRUE(StringValue(std::string()).Equals(value));
397 } 401 }
398 402
399 // Checks that for a fully defined search policy, all elements have been 403 // Checks that for a fully defined search policy, all elements have been
400 // read properly. 404 // read properly.
401 TEST_F(ConfigurationPolicyPrefStoreDefaultSearchTest, FullyDefined) { 405 TEST_F(ConfigurationPolicyPrefStoreDefaultSearchTest, FullyDefined) {
402 const char* const search_url = "http://test.com/search?t={searchTerms}"; 406 const char* const search_url = "http://test.com/search?t={searchTerms}";
403 const char* const suggest_url = "http://test.com/sugg?={searchTerms}"; 407 const char* const suggest_url = "http://test.com/sugg?={searchTerms}";
404 const char* const icon_url = "http://test.com/icon.jpg"; 408 const char* const icon_url = "http://test.com/icon.jpg";
405 const char* const name = "MyName"; 409 const char* const name = "MyName";
406 const char* const keyword = "MyKeyword"; 410 const char* const keyword = "MyKeyword";
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 636
633 provider_.SetInitializationComplete(true); 637 provider_.SetInitializationComplete(true);
634 EXPECT_FALSE(store_.IsInitializationComplete()); 638 EXPECT_FALSE(store_.IsInitializationComplete());
635 639
636 store_.OnUpdatePolicy(); 640 store_.OnUpdatePolicy();
637 Mock::VerifyAndClearExpectations(&observer_); 641 Mock::VerifyAndClearExpectations(&observer_);
638 EXPECT_TRUE(store_.IsInitializationComplete()); 642 EXPECT_TRUE(store_.IsInitializationComplete());
639 } 643 }
640 644
641 } // namespace policy 645 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698