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

Side by Side Diff: chrome/browser/policy/async_policy_provider_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) 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 "chrome/browser/policy/async_policy_provider.h" 5 #include "chrome/browser/policy/async_policy_provider.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/policy/async_policy_loader.h" 9 #include "chrome/browser/policy/async_policy_loader.h"
10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 10 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 AsyncPolicyProviderTest(); 73 AsyncPolicyProviderTest();
74 virtual ~AsyncPolicyProviderTest(); 74 virtual ~AsyncPolicyProviderTest();
75 75
76 virtual void SetUp() OVERRIDE; 76 virtual void SetUp() OVERRIDE;
77 virtual void TearDown() OVERRIDE; 77 virtual void TearDown() OVERRIDE;
78 78
79 PolicyBundle initial_bundle_; 79 PolicyBundle initial_bundle_;
80 MockPolicyLoader* loader_; 80 MockPolicyLoader* loader_;
81 scoped_ptr<AsyncPolicyProvider> provider_; 81 scoped_ptr<AsyncPolicyProvider> provider_;
82 82
83 MessageLoop loop_; 83 base::MessageLoop loop_;
84 84
85 private: 85 private:
86 content::TestBrowserThread ui_thread_; 86 content::TestBrowserThread ui_thread_;
87 content::TestBrowserThread file_thread_; 87 content::TestBrowserThread file_thread_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProviderTest); 89 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProviderTest);
90 }; 90 };
91 91
92 AsyncPolicyProviderTest::AsyncPolicyProviderTest() 92 AsyncPolicyProviderTest::AsyncPolicyProviderTest()
93 : ui_thread_(content::BrowserThread::UI, &loop_), 93 : ui_thread_(content::BrowserThread::UI, &loop_),
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); 216 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0);
217 provider_->Shutdown(); 217 provider_->Shutdown();
218 loop_.RunUntilIdle(); 218 loop_.RunUntilIdle();
219 Mock::VerifyAndClearExpectations(&observer); 219 Mock::VerifyAndClearExpectations(&observer);
220 220
221 provider_->RemoveObserver(&observer); 221 provider_->RemoveObserver(&observer);
222 provider_.reset(); 222 provider_.reset();
223 } 223 }
224 224
225 } // namespace policy 225 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_prefs_unittest.cc ('k') | chrome/browser/policy/browser_policy_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698