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

Side by Side Diff: chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc

Issue 2221153003: Establish MojoChildConnection from BrowserChildProcessHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-channel
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/task_manager/providers/child_process_task.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/chromeos/extensions/device_local_account_external_polic y_loader.h" 5 #include "chrome/browser/chromeos/extensions/device_local_account_external_polic y_loader.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // serve any extensions, even if the force-install list policy is set or a load 193 // serve any extensions, even if the force-install list policy is set or a load
194 // is manually requested. 194 // is manually requested.
195 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, CacheNotStarted) { 195 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, CacheNotStarted) {
196 // Set the force-install list policy. 196 // Set the force-install list policy.
197 SetForceInstallListPolicy(); 197 SetForceInstallListPolicy();
198 198
199 // Manually request a load. 199 // Manually request a load.
200 loader_->StartLoading(); 200 loader_->StartLoading();
201 201
202 EXPECT_FALSE(loader_->IsCacheRunning()); 202 EXPECT_FALSE(loader_->IsCacheRunning());
203 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
204 } 203 }
205 204
206 // Verifies that the cache can be started and stopped correctly. 205 // Verifies that the cache can be started and stopped correctly.
207 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, ForceInstallListEmpty) { 206 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, ForceInstallListEmpty) {
208 // Set an empty force-install list policy. 207 // Set an empty force-install list policy.
209 store_.NotifyStoreLoaded(); 208 store_.NotifyStoreLoaded();
210 209
211 // Start the cache. Verify that the loader announces an empty extension list. 210 // Start the cache. Verify that the loader announces an empty extension list.
212 EXPECT_CALL(visitor_, OnExternalProviderReady(provider_.get())) 211 EXPECT_CALL(visitor_, OnExternalProviderReady(provider_.get()))
213 .Times(1); 212 .Times(1);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 loader_->StopCache(shutdown_run_loop.QuitClosure()); 311 loader_->StopCache(shutdown_run_loop.QuitClosure());
313 VerifyAndResetVisitorCallExpectations(); 312 VerifyAndResetVisitorCallExpectations();
314 313
315 // Spin the loop until the cache shutdown callback is invoked. Verify that at 314 // Spin the loop until the cache shutdown callback is invoked. Verify that at
316 // that point, no further file I/O tasks are pending. 315 // that point, no further file I/O tasks are pending.
317 shutdown_run_loop.Run(); 316 shutdown_run_loop.Run();
318 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); 317 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
319 } 318 }
320 319
321 } // namespace chromeos 320 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/task_manager/providers/child_process_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698