OLD | NEW |
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_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "chrome/browser/policy/config_dir_policy_provider.h" | 8 #include "chrome/browser/policy/config_dir_policy_provider.h" |
9 #include "chrome/browser/policy/mock_configuration_policy_store.h" | 9 #include "chrome/browser/policy/mock_configuration_policy_store.h" |
10 #include "chrome/common/json_value_serializer.h" | 10 #include "chrome/common/json_value_serializer.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | |
13 | 13 |
14 using testing::Mock; | 14 using testing::Mock; |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Shorter reload intervals for testing PolicyDirWatcher. | 18 // Shorter reload intervals for testing PolicyDirWatcher. |
19 const int kSettleIntervalSecondsForTesting = 0; | 19 const int kSettleIntervalSecondsForTesting = 0; |
20 const int kReloadIntervalMinutesForTesting = 1; | 20 const int kReloadIntervalMinutesForTesting = 1; |
21 | 21 |
22 } // namespace | 22 } // namespace |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 policy_store_->policy_map()); | 210 policy_store_->policy_map()); |
211 EXPECT_EQ(1U, policy_map.size()); | 211 EXPECT_EQ(1U, policy_map.size()); |
212 MockConfigurationPolicyStore::PolicyMap::const_iterator entry = | 212 MockConfigurationPolicyStore::PolicyMap::const_iterator entry = |
213 policy_map.find(ConfigurationPolicyStore::kPolicyHomePage); | 213 policy_map.find(ConfigurationPolicyStore::kPolicyHomePage); |
214 ASSERT_TRUE(entry != policy_map.end()); | 214 ASSERT_TRUE(entry != policy_map.end()); |
215 | 215 |
216 std::string str_value; | 216 std::string str_value; |
217 EXPECT_TRUE(entry->second->GetAsString(&str_value)); | 217 EXPECT_TRUE(entry->second->GetAsString(&str_value)); |
218 EXPECT_EQ("http://foo.com", str_value); | 218 EXPECT_EQ("http://foo.com", str_value); |
219 } | 219 } |
OLD | NEW |