| 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( |
| 17 int host_id, const appcache::AppCacheInfo& info) OVERRIDE {} | 17 int host_id, const appcache::AppCacheInfo& info) OVERRIDE {} |
| 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 std::string& message, |
| 28 const std::string& reason, |
| 29 const GURL& url, |
| 30 int status) OVERRIDE {} |
| 28 virtual void OnLogMessage(int host_id, LogLevel log_level, | 31 virtual void OnLogMessage(int host_id, LogLevel log_level, |
| 29 const std::string& message) OVERRIDE {} | 32 const std::string& message) OVERRIDE {} |
| 30 virtual void OnContentBlocked( | 33 virtual void OnContentBlocked( |
| 31 int host_id, const GURL& manifest_url) OVERRIDE {} | 34 int host_id, const GURL& manifest_url) OVERRIDE {} |
| 32 }; | 35 }; |
| 33 | 36 |
| 34 } // namespace | 37 } // namespace |
| 35 | 38 |
| 36 class AppCacheTest : public testing::Test { | 39 class AppCacheTest : public testing::Test { |
| 37 }; | 40 }; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 EXPECT_TRUE(star_greediness.IsMatch( | 689 EXPECT_TRUE(star_greediness.IsMatch( |
| 687 GURL("http://foo.com/a/b/01234567890abcdef/b"))); | 690 GURL("http://foo.com/a/b/01234567890abcdef/b"))); |
| 688 EXPECT_TRUE(star_greediness.IsMatch( | 691 EXPECT_TRUE(star_greediness.IsMatch( |
| 689 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); | 692 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); |
| 690 EXPECT_TRUE(star_greediness.IsMatch( | 693 EXPECT_TRUE(star_greediness.IsMatch( |
| 691 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" | 694 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" |
| 692 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); | 695 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); |
| 693 } | 696 } |
| 694 | 697 |
| 695 } // namespace appacache | 698 } // namespace appacache |
| OLD | NEW |