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

Unified Diff: webkit/appcache/appcache_unittest.cc

Issue 192043: AppCacheHost cache selection algorithm (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/appcache/manifest_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_unittest.cc
===================================================================
--- webkit/appcache/appcache_unittest.cc (revision 26254)
+++ webkit/appcache/appcache_unittest.cc (working copy)
@@ -4,33 +4,29 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/appcache/appcache.h"
+#include "webkit/appcache/appcache_frontend_impl.h"
#include "webkit/appcache/appcache_host.h"
#include "webkit/appcache/appcache_service.h"
-using appcache::AppCache;
-using appcache::AppCacheEntry;
-using appcache::AppCacheHost;
-using appcache::AppCacheService;
+namespace appcache {
-namespace {
-
class AppCacheTest : public testing::Test {
};
-} // namespace
-
TEST(AppCacheTest, CleanupUnusedCache) {
AppCacheService service;
+ AppCacheFrontendImpl frontend;
AppCache* cache = new AppCache(&service, 111);
+ cache->set_complete(true);
- AppCacheHost host1(1, NULL);
- AppCacheHost host2(2, NULL);
+ AppCacheHost host1(1, &frontend, &service);
+ AppCacheHost host2(2, &frontend, &service);
- host1.set_selected_cache(cache);
- host2.set_selected_cache(cache);
+ host1.AssociateCache(cache);
+ host2.AssociateCache(cache);
- host1.set_selected_cache(NULL);
- host2.set_selected_cache(NULL);
+ host1.AssociateCache(NULL);
+ host2.AssociateCache(NULL);
}
TEST(AppCacheTest, AddModifyEntry) {
@@ -53,3 +49,6 @@
cache->GetEntry(kUrl1)->types());
EXPECT_EQ(entry2.types(), cache->GetEntry(kUrl2)->types()); // unchanged
}
+
+} // namespace appacache
+
« no previous file with comments | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/appcache/manifest_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698