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

Side by Side Diff: content/browser/appcache/chrome_appcache_service_unittest.cc

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 BrowserThreadImpl cache_thread_; 66 BrowserThreadImpl cache_thread_;
67 BrowserThreadImpl io_thread_; 67 BrowserThreadImpl io_thread_;
68 }; 68 };
69 69
70 scoped_refptr<ChromeAppCacheService> 70 scoped_refptr<ChromeAppCacheService>
71 ChromeAppCacheServiceTest::CreateAppCacheService( 71 ChromeAppCacheServiceTest::CreateAppCacheService(
72 const FilePath& appcache_path, 72 const FilePath& appcache_path,
73 bool init_storage) { 73 bool init_storage) {
74 scoped_refptr<ChromeAppCacheService> appcache_service = 74 scoped_refptr<ChromeAppCacheService> appcache_service =
75 new ChromeAppCacheService(NULL); 75 new ChromeAppCacheService(NULL);
76 const content::ResourceContext* resource_context = NULL; 76 content::ResourceContext* resource_context = NULL;
77 scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = 77 scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy =
78 new quota::MockSpecialStoragePolicy; 78 new quota::MockSpecialStoragePolicy;
79 mock_policy->AddProtected(kProtectedManifestURL.GetOrigin()); 79 mock_policy->AddProtected(kProtectedManifestURL.GetOrigin());
80 mock_policy->AddSessionOnly(kSessionOnlyManifestURL.GetOrigin()); 80 mock_policy->AddSessionOnly(kSessionOnlyManifestURL.GetOrigin());
81 BrowserThread::PostTask( 81 BrowserThread::PostTask(
82 BrowserThread::IO, FROM_HERE, 82 BrowserThread::IO, FROM_HERE,
83 base::Bind(&ChromeAppCacheService::InitializeOnIOThread, 83 base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
84 appcache_service.get(), appcache_path, resource_context, 84 appcache_service.get(), appcache_path, resource_context,
85 mock_policy)); 85 mock_policy));
86 // Steps needed to initialize the storage of AppCache data. 86 // Steps needed to initialize the storage of AppCache data.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) != origins.end()); 222 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) != origins.end());
223 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) != 223 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) !=
224 origins.end()); 224 origins.end());
225 225
226 // Delete and let cleanup tasks run prior to returning. 226 // Delete and let cleanup tasks run prior to returning.
227 appcache_service = NULL; 227 appcache_service = NULL;
228 message_loop_.RunAllPending(); 228 message_loop_.RunAllPending();
229 } 229 }
230 230
231 } // namespace appcache 231 } // namespace appcache
OLDNEW
« no previous file with comments | « content/browser/appcache/chrome_appcache_service.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698