| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "webkit/appcache/appcache.h" | 7 #include "webkit/appcache/appcache.h" |
| 8 #include "webkit/appcache/appcache_group.h" | 8 #include "webkit/appcache/appcache_group.h" |
| 9 #include "webkit/appcache/appcache_response.h" | 9 #include "webkit/appcache/appcache_response.h" |
| 10 #include "webkit/appcache/appcache_storage.h" | 10 #include "webkit/appcache/appcache_storage.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 void OnGroupMadeObsolete(AppCacheGroup* group, bool success) { | 41 void OnGroupMadeObsolete(AppCacheGroup* group, bool success) { |
| 42 obsoleted_group_ = group; | 42 obsoleted_group_ = group; |
| 43 obsoleted_success_ = success; | 43 obsoleted_success_ = success; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void OnMainResponseFound(const GURL& url, const AppCacheEntry& entry, | 46 void OnMainResponseFound(const GURL& url, const AppCacheEntry& entry, |
| 47 const GURL& fallback_url, | 47 const GURL& fallback_url, |
| 48 const AppCacheEntry& fallback_entry, | 48 const AppCacheEntry& fallback_entry, |
| 49 int64 cache_id, const GURL& manifest_url, | 49 int64 cache_id, const GURL& manifest_url) { |
| 50 bool was_blocked_by_policy) { | |
| 51 found_url_ = url; | 50 found_url_ = url; |
| 52 found_entry_ = entry; | 51 found_entry_ = entry; |
| 53 found_fallback_url_ = fallback_url; | 52 found_fallback_url_ = fallback_url; |
| 54 found_fallback_entry_ = fallback_entry; | 53 found_fallback_entry_ = fallback_entry; |
| 55 found_cache_id_ = cache_id; | 54 found_cache_id_ = cache_id; |
| 56 found_manifest_url_ = manifest_url; | 55 found_manifest_url_ = manifest_url; |
| 57 } | 56 } |
| 58 | 57 |
| 59 scoped_refptr<AppCache> loaded_cache_; | 58 scoped_refptr<AppCache> loaded_cache_; |
| 60 int64 loaded_cache_id_; | 59 int64 loaded_cache_id_; |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_); | 610 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_); |
| 612 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id()); | 611 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id()); |
| 613 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id()); | 612 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id()); |
| 614 EXPECT_TRUE(delegate.found_fallback_url_.is_empty()); | 613 EXPECT_TRUE(delegate.found_fallback_url_.is_empty()); |
| 615 EXPECT_EQ(0, delegate.found_entry_.types()); | 614 EXPECT_EQ(0, delegate.found_entry_.types()); |
| 616 EXPECT_EQ(0, delegate.found_fallback_entry_.types()); | 615 EXPECT_EQ(0, delegate.found_fallback_entry_.types()); |
| 617 } | 616 } |
| 618 | 617 |
| 619 } // namespace appcache | 618 } // namespace appcache |
| 620 | 619 |
| OLD | NEW |