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

Side by Side Diff: components/policy/core/common/policy_loader_mac_unittest.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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
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 <CoreFoundation/CoreFoundation.h> 5 #include <CoreFoundation/CoreFoundation.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // once the mac loader supports 3rd party policy. http://crbug.com/108995 133 // once the mac loader supports 3rd party policy. http://crbug.com/108995
134 134
135 // Special test cases for some mac preferences details. 135 // Special test cases for some mac preferences details.
136 class PolicyLoaderMacTest : public PolicyTestBase { 136 class PolicyLoaderMacTest : public PolicyTestBase {
137 protected: 137 protected:
138 PolicyLoaderMacTest() 138 PolicyLoaderMacTest()
139 : prefs_(new MockPreferences()) {} 139 : prefs_(new MockPreferences()) {}
140 140
141 void SetUp() override { 141 void SetUp() override {
142 PolicyTestBase::SetUp(); 142 PolicyTestBase::SetUp();
143 scoped_ptr<AsyncPolicyLoader> loader(new PolicyLoaderMac( 143 scoped_ptr<AsyncPolicyLoader> loader(
144 loop_.message_loop_proxy(), base::FilePath(), prefs_)); 144 new PolicyLoaderMac(loop_.task_runner(), base::FilePath(), prefs_));
145 provider_.reset(new AsyncPolicyProvider(&schema_registry_, loader.Pass())); 145 provider_.reset(new AsyncPolicyProvider(&schema_registry_, loader.Pass()));
146 provider_->Init(&schema_registry_); 146 provider_->Init(&schema_registry_);
147 } 147 }
148 148
149 void TearDown() override { 149 void TearDown() override {
150 provider_->Shutdown(); 150 provider_->Shutdown();
151 PolicyTestBase::TearDown(); 151 PolicyTestBase::TearDown();
152 } 152 }
153 153
154 MockPreferences* prefs_; 154 MockPreferences* prefs_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 189 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
190 .Set(test_keys::kKeyString, 190 .Set(test_keys::kKeyString,
191 POLICY_LEVEL_RECOMMENDED, 191 POLICY_LEVEL_RECOMMENDED,
192 POLICY_SCOPE_USER, 192 POLICY_SCOPE_USER,
193 new base::StringValue("string value"), 193 new base::StringValue("string value"),
194 NULL); 194 NULL);
195 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); 195 EXPECT_TRUE(provider_->policies().Equals(expected_bundle));
196 } 196 }
197 197
198 } // namespace policy 198 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698