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

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

Issue 653623002: Revert "Move ExtensionCache to //extensions" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable AutoEnrollmentClientTest.* and DeviceLocalAccountExternalPolicyLoaderTest.CacheNotStarted te… Created 6 years, 2 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/chromeos/policy/auto_enrollment_client_unittest.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 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 kExtensionId, 171 kExtensionId,
172 extension_urls::GetWebstoreUpdateUrl().spec().c_str())); 172 extension_urls::GetWebstoreUpdateUrl().spec().c_str()));
173 store_.policy_map_.Set(policy::key::kExtensionInstallForcelist, 173 store_.policy_map_.Set(policy::key::kExtensionInstallForcelist,
174 policy::POLICY_LEVEL_MANDATORY, 174 policy::POLICY_LEVEL_MANDATORY,
175 policy::POLICY_SCOPE_USER, 175 policy::POLICY_SCOPE_USER,
176 forcelist.release(), 176 forcelist.release(),
177 NULL); 177 NULL);
178 store_.NotifyStoreLoaded(); 178 store_.NotifyStoreLoaded();
179 } 179 }
180 180
181 #if defined(OS_CHROMEOS)
182 // crbug.com/422884
183 #define MAYBE_CacheNotStarted DISABLED_CacheNotStarted
184 #else
185 #define MAYBE_CacheNotStarted CacheNotStarted
186 #endif
187
188 // Verifies that when the cache is not explicitly started, the loader does not 181 // Verifies that when the cache is not explicitly started, the loader does not
189 // serve any extensions, even if the force-install list policy is set or a load 182 // serve any extensions, even if the force-install list policy is set or a load
190 // is manually requested. 183 // is manually requested.
191 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, MAYBE_CacheNotStarted) { 184 TEST_F(DeviceLocalAccountExternalPolicyLoaderTest, CacheNotStarted) {
192 // Set the force-install list policy. 185 // Set the force-install list policy.
193 SetForceInstallListPolicy(); 186 SetForceInstallListPolicy();
194 187
195 // Manually request a load. 188 // Manually request a load.
196 loader_->StartLoading(); 189 loader_->StartLoading();
197 190
198 EXPECT_FALSE(loader_->IsCacheRunning()); 191 EXPECT_FALSE(loader_->IsCacheRunning());
199 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); 192 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
200 } 193 }
201 194
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 loader_->StopCache(shutdown_run_loop.QuitClosure()); 300 loader_->StopCache(shutdown_run_loop.QuitClosure());
308 VerifyAndResetVisitorCallExpectations(); 301 VerifyAndResetVisitorCallExpectations();
309 302
310 // Spin the loop until the cache shutdown callback is invoked. Verify that at 303 // Spin the loop until the cache shutdown callback is invoked. Verify that at
311 // that point, no further file I/O tasks are pending. 304 // that point, no further file I/O tasks are pending.
312 shutdown_run_loop.Run(); 305 shutdown_run_loop.Run();
313 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); 306 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
314 } 307 }
315 308
316 } // namespace chromeos 309 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698