OLD | NEW |
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 test_dir_.Append(kExtensionCRXSourceDir).Append(kExtensionCRXFile), | 305 test_dir_.Append(kExtensionCRXSourceDir).Append(kExtensionCRXFile), |
306 cached_crx_path)); | 306 cached_crx_path)); |
307 | 307 |
308 // Stop the cache. Verify that the loader announces an empty extension list. | 308 // Stop the cache. Verify that the loader announces an empty extension list. |
309 EXPECT_CALL(visitor_, OnExternalProviderReady(provider_.get())) | 309 EXPECT_CALL(visitor_, OnExternalProviderReady(provider_.get())) |
310 .Times(1); | 310 .Times(1); |
311 base::RunLoop shutdown_run_loop; | 311 base::RunLoop shutdown_run_loop; |
312 loader_->StopCache(shutdown_run_loop.QuitClosure()); | 312 loader_->StopCache(shutdown_run_loop.QuitClosure()); |
313 VerifyAndResetVisitorCallExpectations(); | 313 VerifyAndResetVisitorCallExpectations(); |
314 | 314 |
315 // Spin the loop until the cache shutdown callback is invoked. Verify that at | 315 // Spin the loop until the cache shutdown callback is invoked. |
316 // 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()); | |
319 } | 317 } |
320 | 318 |
321 } // namespace chromeos | 319 } // namespace chromeos |
OLD | NEW |