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

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

Issue 8480003: Surface error messages from ONC parsing in about:policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only compile unit test for chromium os. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" 7 #include "chrome/browser/policy/configuration_policy_pref_store.h"
8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 8 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" 10 #include "chrome/browser/prefs/proxy_config_dictionary.h"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "chrome/common/pref_store_observer_mock.h" 12 #include "chrome/common/pref_store_observer_mock.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using testing::Mock;
16 using testing::_; 17 using testing::_;
17 using testing::Mock;
18 18
19 namespace policy { 19 namespace policy {
20 20
21 // Holds a set of test parameters, consisting of pref name and policy type. 21 // Holds a set of test parameters, consisting of pref name and policy type.
22 class TypeAndName { 22 class TypeAndName {
23 public: 23 public:
24 TypeAndName(ConfigurationPolicyType type, const char* pref_name) 24 TypeAndName(ConfigurationPolicyType type, const char* pref_name)
25 : type_(type), 25 : type_(type),
26 pref_name_(pref_name) {} 26 pref_name_(pref_name) {}
27 27
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 provider_.SetInitializationComplete(true); 976 provider_.SetInitializationComplete(true);
977 EXPECT_FALSE(store_->IsInitializationComplete()); 977 EXPECT_FALSE(store_->IsInitializationComplete());
978 978
979 store_->OnUpdatePolicy(); 979 store_->OnUpdatePolicy();
980 Mock::VerifyAndClearExpectations(&observer_); 980 Mock::VerifyAndClearExpectations(&observer_);
981 EXPECT_TRUE(store_->IsInitializationComplete()); 981 EXPECT_TRUE(store_->IsInitializationComplete());
982 } 982 }
983 983
984 } // namespace policy 984 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698