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

Unified Diff: chrome/browser/browsing_data_remover_unittest.cc

Issue 7464029: Adding QuotaManager logic to TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uglay. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/testing_profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover_unittest.cc
diff --git a/chrome/browser/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data_remover_unittest.cc
index 489efa7b6de50399fcae10489a15108ebeca9c01..043af118cb6b007b7479326f615c60ba6a18ede9 100644
--- a/chrome/browser/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data_remover_unittest.cc
@@ -361,24 +361,19 @@ TEST_F(BrowsingDataRemoverTest, RemoveFileSystemsForever) {
}
TEST_F(BrowsingDataRemoverTest, RemoveAppCacheForever) {
- // Set up ChromeAppCacheService.
- scoped_refptr<ChromeAppCacheService> appcache_service =
- new ChromeAppCacheService(NULL);
- const content::ResourceContext* resource_context = NULL;
+ // Set up ChromeAppCacheService with a single protected origin
scoped_refptr<MockExtensionSpecialStoragePolicy> mock_policy =
new MockExtensionSpecialStoragePolicy;
mock_policy->AddProtected(kProtectedManifest.GetOrigin());
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(appcache_service.get(),
- &ChromeAppCacheService::InitializeOnIOThread,
- FilePath(),
- resource_context,
- mock_policy,
- false));
+ GetProfile()->SetExtensionSpecialStoragePolicy(mock_policy);
+ scoped_refptr<ChromeAppCacheService> appcache_service =
+ GetProfile()->GetAppCacheService();
+
+ // AppCacheService is initialized asynchronously. It must be finished before
+ // we can safely run BrowsingDataRemover's methods, so let's block a moment.
MessageLoop::current()->RunAllPending();
+
TestingProfile* profile = GetProfile();
- profile->SetAppCacheService(appcache_service);
profile->SetExtensionSpecialStoragePolicy(mock_policy);
// Add data into the AppCacheStorage.
« no previous file with comments | « no previous file | chrome/test/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698