OLD | NEW |
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 "components/policy/core/common/policy_loader_mac.h" | 5 #include "components/policy/core/common/policy_loader_mac.h" |
6 | 6 |
7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 prefs_->AddTestItem(name, test_value.get(), false); | 192 prefs_->AddTestItem(name, test_value.get(), false); |
193 | 193 |
194 // Make the provider read the updated |prefs_|. | 194 // Make the provider read the updated |prefs_|. |
195 provider_->RefreshPolicies(); | 195 provider_->RefreshPolicies(); |
196 ASSERT_TRUE(base::MessageLoopForIO::IsCurrent()); | 196 ASSERT_TRUE(base::MessageLoopForIO::IsCurrent()); |
197 base::RunLoop().RunUntilIdle(); | 197 base::RunLoop().RunUntilIdle(); |
198 PolicyBundle expected_bundle; | 198 PolicyBundle expected_bundle; |
199 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) | 199 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
200 .Set(test_keys::kKeyString, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, | 200 .Set(test_keys::kKeyString, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, |
201 POLICY_SOURCE_PLATFORM, | 201 POLICY_SOURCE_PLATFORM, |
202 base::MakeUnique<base::StringValue>("string value"), nullptr); | 202 base::MakeUnique<base::Value>("string value"), nullptr); |
203 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); | 203 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); |
204 } | 204 } |
205 | 205 |
206 } // namespace policy | 206 } // namespace policy |
OLD | NEW |