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

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

Issue 330053004: Rename some appcache types in preparation for moving to content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/appcache/mock_appcache_service.h" 5 #include "content/browser/appcache/mock_appcache_service.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "webkit/browser/appcache/appcache.h" 7 #include "webkit/browser/appcache/appcache.h"
8 #include "webkit/browser/appcache/appcache_host.h" 8 #include "webkit/browser/appcache/appcache_host.h"
9 9
10 using appcache::AppCache; 10 using appcache::AppCache;
11 using appcache::AppCacheDatabase; 11 using appcache::AppCacheDatabase;
12 using appcache::AppCacheEntry; 12 using appcache::AppCacheEntry;
13 using appcache::AppCacheFrontend; 13 using appcache::AppCacheFrontend;
14 using appcache::AppCacheGroup; 14 using appcache::AppCacheGroup;
15 using appcache::AppCacheHost; 15 using appcache::AppCacheHost;
16 using appcache::AppCacheInfo; 16 using appcache::AppCacheInfo;
17 using appcache::ErrorDetails; 17 using appcache::AppCacheErrorDetails;
18 using appcache::EventID; 18 using appcache::AppCacheEventID;
19 using appcache::FALLBACK_NAMESPACE; 19 using appcache::FALLBACK_NAMESPACE;
20 using appcache::INTERCEPT_NAMESPACE; 20 using appcache::INTERCEPT_NAMESPACE;
21 using appcache::LogLevel; 21 using appcache::AppCacheLogLevel;
22 using appcache::Manifest; 22 using appcache::Manifest;
23 using appcache::Namespace; 23 using appcache::Namespace;
24 using appcache::NamespaceVector; 24 using appcache::NamespaceVector;
25 using appcache::NETWORK_NAMESPACE; 25 using appcache::NETWORK_NAMESPACE;
26 using appcache::PARSE_MANIFEST_ALLOWING_INTERCEPTS; 26 using appcache::PARSE_MANIFEST_ALLOWING_INTERCEPTS;
27 using appcache::PARSE_MANIFEST_PER_STANDARD; 27 using appcache::PARSE_MANIFEST_PER_STANDARD;
28 using appcache::Status; 28 using appcache::AppCacheStatus;
29 29
30 namespace content { 30 namespace content {
31 31
32 namespace { 32 namespace {
33 33
34 class MockAppCacheFrontend : public AppCacheFrontend { 34 class MockAppCacheFrontend : public AppCacheFrontend {
35 public: 35 public:
36 virtual void OnCacheSelected(int host_id, const AppCacheInfo& info) OVERRIDE { 36 virtual void OnCacheSelected(int host_id, const AppCacheInfo& info) OVERRIDE {
37 } 37 }
38 virtual void OnStatusChanged(const std::vector<int>& host_ids, 38 virtual void OnStatusChanged(const std::vector<int>& host_ids,
39 Status status) OVERRIDE {} 39 AppCacheStatus status) OVERRIDE {}
40 virtual void OnEventRaised(const std::vector<int>& host_ids, 40 virtual void OnEventRaised(const std::vector<int>& host_ids,
41 EventID event_id) OVERRIDE {} 41 AppCacheEventID event_id) OVERRIDE {}
42 virtual void OnProgressEventRaised( 42 virtual void OnProgressEventRaised(
43 const std::vector<int>& host_ids, 43 const std::vector<int>& host_ids,
44 const GURL& url, 44 const GURL& url,
45 int num_total, int num_complete) OVERRIDE {} 45 int num_total, int num_complete) OVERRIDE {}
46 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, 46 virtual void OnErrorEventRaised(
47 const ErrorDetails& details) OVERRIDE {} 47 const std::vector<int>& host_ids,
48 virtual void OnLogMessage(int host_id, LogLevel log_level, 48 const AppCacheErrorDetails& details) OVERRIDE {}
49 virtual void OnLogMessage(int host_id, AppCacheLogLevel log_level,
49 const std::string& message) OVERRIDE {} 50 const std::string& message) OVERRIDE {}
50 virtual void OnContentBlocked( 51 virtual void OnContentBlocked(
51 int host_id, const GURL& manifest_url) OVERRIDE {} 52 int host_id, const GURL& manifest_url) OVERRIDE {}
52 }; 53 };
53 54
54 } // namespace 55 } // namespace
55 56
56 class AppCacheTest : public testing::Test { 57 class AppCacheTest : public testing::Test {
57 }; 58 };
58 59
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 EXPECT_TRUE(star_greediness.IsMatch( 707 EXPECT_TRUE(star_greediness.IsMatch(
707 GURL("http://foo.com/a/b/01234567890abcdef/b"))); 708 GURL("http://foo.com/a/b/01234567890abcdef/b")));
708 EXPECT_TRUE(star_greediness.IsMatch( 709 EXPECT_TRUE(star_greediness.IsMatch(
709 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); 710 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b")));
710 EXPECT_TRUE(star_greediness.IsMatch( 711 EXPECT_TRUE(star_greediness.IsMatch(
711 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" 712 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_"
712 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); 713 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b")));
713 } 714 }
714 715
715 } // namespace content 716 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698