OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "webkit/browser/appcache/appcache.h" | 6 #include "webkit/browser/appcache/appcache.h" |
7 #include "webkit/browser/appcache/appcache_host.h" | 7 #include "webkit/browser/appcache/appcache_host.h" |
8 #include "webkit/browser/appcache/mock_appcache_service.h" | 8 #include "webkit/browser/appcache/mock_appcache_service.h" |
9 | 9 |
10 namespace appcache { | 10 namespace appcache { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 class MockAppCacheFrontend : public AppCacheFrontend { | 14 class MockAppCacheFrontend : public AppCacheFrontend { |
15 public: | 15 public: |
16 virtual void OnCacheSelected( | 16 virtual void OnCacheSelected(int host_id, const AppCacheInfo& info) OVERRIDE { |
17 int host_id, const appcache::AppCacheInfo& info) OVERRIDE {} | 17 } |
18 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 18 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
19 Status status) OVERRIDE {} | 19 Status status) OVERRIDE {} |
20 virtual void OnEventRaised(const std::vector<int>& host_ids, | 20 virtual void OnEventRaised(const std::vector<int>& host_ids, |
21 EventID event_id) OVERRIDE {} | 21 EventID event_id) OVERRIDE {} |
22 virtual void OnProgressEventRaised( | 22 virtual void OnProgressEventRaised( |
23 const std::vector<int>& host_ids, | 23 const std::vector<int>& host_ids, |
24 const GURL& url, | 24 const GURL& url, |
25 int num_total, int num_complete) OVERRIDE {} | 25 int num_total, int num_complete) OVERRIDE {} |
26 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, | 26 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
27 const std::string& message) OVERRIDE {} | 27 const ErrorDetails& details) OVERRIDE {} |
28 virtual void OnLogMessage(int host_id, LogLevel log_level, | 28 virtual void OnLogMessage(int host_id, LogLevel log_level, |
29 const std::string& message) OVERRIDE {} | 29 const std::string& message) OVERRIDE {} |
30 virtual void OnContentBlocked( | 30 virtual void OnContentBlocked( |
31 int host_id, const GURL& manifest_url) OVERRIDE {} | 31 int host_id, const GURL& manifest_url) OVERRIDE {} |
32 }; | 32 }; |
33 | 33 |
34 } // namespace | 34 } // namespace |
35 | 35 |
36 class AppCacheTest : public testing::Test { | 36 class AppCacheTest : public testing::Test { |
37 }; | 37 }; |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 EXPECT_TRUE(star_greediness.IsMatch( | 686 EXPECT_TRUE(star_greediness.IsMatch( |
687 GURL("http://foo.com/a/b/01234567890abcdef/b"))); | 687 GURL("http://foo.com/a/b/01234567890abcdef/b"))); |
688 EXPECT_TRUE(star_greediness.IsMatch( | 688 EXPECT_TRUE(star_greediness.IsMatch( |
689 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); | 689 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); |
690 EXPECT_TRUE(star_greediness.IsMatch( | 690 EXPECT_TRUE(star_greediness.IsMatch( |
691 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" | 691 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" |
692 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); | 692 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); |
693 } | 693 } |
694 | 694 |
695 } // namespace appacache | 695 } // namespace appacache |
OLD | NEW |