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

Side by Side Diff: webkit/appcache/appcache_service_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_service.cc ('k') | webkit/appcache/appcache_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 (c) 2009 The Chromium Authos. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authos. 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "webkit/appcache/appcache.h" 6 #include "webkit/appcache/appcache.h"
7 #include "webkit/appcache/appcache_group.h" 7 #include "webkit/appcache/appcache_group.h"
8 #include "webkit/appcache/appcache_service.h" 8 #include "webkit/appcache/appcache_service.h"
9 9
10 using appcache::AppCache; 10 namespace appcache {
11 using appcache::AppCacheGroup;
12 using appcache::AppCacheService;
13
14 namespace {
15 11
16 class AppCacheServiceTest : public testing::Test { 12 class AppCacheServiceTest : public testing::Test {
17 }; 13 };
18 14
19 } // namespace
20
21 TEST(AppCacheServiceTest, AddRemoveCache) { 15 TEST(AppCacheServiceTest, AddRemoveCache) {
22 AppCacheService service; 16 AppCacheService service;
23 scoped_refptr<AppCache> cache = new AppCache(&service, 111); 17 scoped_refptr<AppCache> cache = new AppCache(&service, 111);
24 service.RemoveCache(cache); 18 service.RemoveCache(cache);
25 19
26 // Removing non-existing cache from service should not fail. 20 // Removing non-existing cache from service should not fail.
27 AppCacheService dummy; 21 AppCacheService dummy;
28 dummy.RemoveCache(cache); 22 dummy.RemoveCache(cache);
29 } 23 }
30 24
31 TEST(AppCacheServiceTest, AddRemoveGroup) { 25 TEST(AppCacheServiceTest, AddRemoveGroup) {
32 AppCacheService service; 26 AppCacheService service;
33 scoped_refptr<AppCacheGroup> group = 27 scoped_refptr<AppCacheGroup> group =
34 new AppCacheGroup(&service, GURL::EmptyGURL()); 28 new AppCacheGroup(&service, GURL::EmptyGURL());
35 service.RemoveGroup(group); 29 service.RemoveGroup(group);
36 30
37 // Removing non-existing group from service should not fail. 31 // Removing non-existing group from service should not fail.
38 AppCacheService dummy; 32 AppCacheService dummy;
39 dummy.RemoveGroup(group); 33 dummy.RemoveGroup(group);
40 } 34 }
35
36 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_service.cc ('k') | webkit/appcache/appcache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698