| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/appcache/appcache.h" | 6 #include "webkit/appcache/appcache.h" |
| 7 #include "webkit/appcache/appcache_frontend_impl.h" | 7 #include "webkit/appcache/appcache_frontend_impl.h" |
| 8 #include "webkit/appcache/appcache_host.h" | 8 #include "webkit/appcache/appcache_host.h" |
| 9 #include "webkit/appcache/mock_appcache_service.h" | 9 #include "webkit/appcache/mock_appcache_service.h" |
| 10 | 10 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 EXPECT_FALSE(fallback_entry.has_response_id()); | 211 EXPECT_FALSE(fallback_entry.has_response_id()); |
| 212 EXPECT_FALSE(network_namespace); | 212 EXPECT_FALSE(network_namespace); |
| 213 | 213 |
| 214 entry = AppCacheEntry(); // reset | 214 entry = AppCacheEntry(); // reset |
| 215 | 215 |
| 216 found = cache->FindResponseForRequest(kFallbackTestUrl1, | 216 found = cache->FindResponseForRequest(kFallbackTestUrl1, |
| 217 &entry, &fallback_entry, &fallback_namespace, &network_namespace); | 217 &entry, &fallback_entry, &fallback_namespace, &network_namespace); |
| 218 EXPECT_TRUE(found); | 218 EXPECT_TRUE(found); |
| 219 EXPECT_FALSE(entry.has_response_id()); | 219 EXPECT_FALSE(entry.has_response_id()); |
| 220 EXPECT_EQ(kFallbackResponseId1, fallback_entry.response_id()); | 220 EXPECT_EQ(kFallbackResponseId1, fallback_entry.response_id()); |
| 221 EXPECT_EQ(kFallbackEntryUrl1, |
| 222 cache->GetFallbackEntryUrl(fallback_namespace)); |
| 221 EXPECT_FALSE(network_namespace); | 223 EXPECT_FALSE(network_namespace); |
| 222 | 224 |
| 223 fallback_entry = AppCacheEntry(); // reset | 225 fallback_entry = AppCacheEntry(); // reset |
| 224 | 226 |
| 225 found = cache->FindResponseForRequest(kFallbackTestUrl2, | 227 found = cache->FindResponseForRequest(kFallbackTestUrl2, |
| 226 &entry, &fallback_entry, &fallback_namespace, &network_namespace); | 228 &entry, &fallback_entry, &fallback_namespace, &network_namespace); |
| 227 EXPECT_TRUE(found); | 229 EXPECT_TRUE(found); |
| 228 EXPECT_FALSE(entry.has_response_id()); | 230 EXPECT_FALSE(entry.has_response_id()); |
| 229 EXPECT_EQ(kFallbackResponseId2, fallback_entry.response_id()); | 231 EXPECT_EQ(kFallbackResponseId2, fallback_entry.response_id()); |
| 232 EXPECT_EQ(kFallbackEntryUrl2, |
| 233 cache->GetFallbackEntryUrl(fallback_namespace)); |
| 230 EXPECT_FALSE(network_namespace); | 234 EXPECT_FALSE(network_namespace); |
| 231 } | 235 } |
| 232 | 236 |
| 233 } // namespace appacache | 237 } // namespace appacache |
| 234 | 238 |
| OLD | NEW |