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

Side by Side Diff: chrome/browser/policy/cloud/component_cloud_policy_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/policy/cloud/component_cloud_policy_service.h" 5 #include "chrome/browser/policy/cloud/component_cloud_policy_service.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return builder_.GetBlob(); 189 return builder_.GetBlob();
190 } 190 }
191 191
192 scoped_ptr<PolicySchema> CreateTestSchema() { 192 scoped_ptr<PolicySchema> CreateTestSchema() {
193 std::string error; 193 std::string error;
194 scoped_ptr<PolicySchema> schema = PolicySchema::Parse(kTestSchema, &error); 194 scoped_ptr<PolicySchema> schema = PolicySchema::Parse(kTestSchema, &error);
195 EXPECT_TRUE(schema) << error; 195 EXPECT_TRUE(schema) << error;
196 return schema.Pass(); 196 return schema.Pass();
197 } 197 }
198 198
199 MessageLoop loop_; 199 base::MessageLoop loop_;
200 content::TestBrowserThread ui_thread_; 200 content::TestBrowserThread ui_thread_;
201 content::TestBrowserThread file_thread_; 201 content::TestBrowserThread file_thread_;
202 base::ScopedTempDir temp_dir_; 202 base::ScopedTempDir temp_dir_;
203 scoped_refptr<TestURLRequestContextGetter> request_context_; 203 scoped_refptr<TestURLRequestContextGetter> request_context_;
204 net::TestURLFetcherFactory fetcher_factory_; 204 net::TestURLFetcherFactory fetcher_factory_;
205 MockComponentCloudPolicyDelegate delegate_; 205 MockComponentCloudPolicyDelegate delegate_;
206 // |cache_| is owned by the |service_| and is invalid once the |service_| 206 // |cache_| is owned by the |service_| and is invalid once the |service_|
207 // is destroyed. 207 // is destroyed.
208 ResourceCache* cache_; 208 ResourceCache* cache_;
209 MockCloudPolicyClient client_; 209 MockCloudPolicyClient client_;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 Mock::VerifyAndClearExpectations(&delegate_); 513 Mock::VerifyAndClearExpectations(&delegate_);
514 514
515 // The policy is now being served. 515 // The policy is now being served.
516 PolicyNamespace ns(POLICY_DOMAIN_EXTENSIONS, kTestExtension); 516 PolicyNamespace ns(POLICY_DOMAIN_EXTENSIONS, kTestExtension);
517 PolicyBundle expected_bundle; 517 PolicyBundle expected_bundle;
518 expected_bundle.Get(ns).CopyFrom(expected_policy_); 518 expected_bundle.Get(ns).CopyFrom(expected_policy_);
519 EXPECT_TRUE(service_->policy().Equals(expected_bundle)); 519 EXPECT_TRUE(service_->policy().Equals(expected_bundle));
520 } 520 }
521 521
522 } // namespace policy 522 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698