| OLD | NEW |
| 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 <stack> | 5 #include <stack> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "content/browser/appcache/appcache.h" |
| 17 #include "content/browser/appcache/appcache_backend_impl.h" |
| 18 #include "content/browser/appcache/appcache_database.h" |
| 19 #include "content/browser/appcache/appcache_entry.h" |
| 20 #include "content/browser/appcache/appcache_group.h" |
| 21 #include "content/browser/appcache/appcache_host.h" |
| 16 #include "content/browser/appcache/appcache_interceptor.h" | 22 #include "content/browser/appcache/appcache_interceptor.h" |
| 23 #include "content/browser/appcache/appcache_request_handler.h" |
| 24 #include "content/browser/appcache/appcache_service_impl.h" |
| 25 #include "content/browser/appcache/appcache_storage_impl.h" |
| 17 #include "net/base/net_errors.h" | 26 #include "net/base/net_errors.h" |
| 18 #include "net/base/request_priority.h" | 27 #include "net/base/request_priority.h" |
| 19 #include "net/http/http_response_headers.h" | 28 #include "net/http/http_response_headers.h" |
| 20 #include "net/url_request/url_request_error_job.h" | 29 #include "net/url_request/url_request_error_job.h" |
| 21 #include "net/url_request/url_request_job_factory_impl.h" | 30 #include "net/url_request/url_request_job_factory_impl.h" |
| 22 #include "net/url_request/url_request_test_job.h" | 31 #include "net/url_request/url_request_test_job.h" |
| 23 #include "net/url_request/url_request_test_util.h" | 32 #include "net/url_request/url_request_test_util.h" |
| 24 #include "sql/test/test_helpers.h" | 33 #include "sql/test/test_helpers.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "webkit/browser/appcache/appcache.h" | |
| 27 #include "webkit/browser/appcache/appcache_backend_impl.h" | |
| 28 #include "webkit/browser/appcache/appcache_database.h" | |
| 29 #include "webkit/browser/appcache/appcache_entry.h" | |
| 30 #include "webkit/browser/appcache/appcache_group.h" | |
| 31 #include "webkit/browser/appcache/appcache_host.h" | |
| 32 #include "webkit/browser/appcache/appcache_request_handler.h" | |
| 33 #include "webkit/browser/appcache/appcache_service_impl.h" | |
| 34 #include "webkit/browser/appcache/appcache_storage_impl.h" | |
| 35 #include "webkit/browser/quota/quota_manager.h" | 35 #include "webkit/browser/quota/quota_manager.h" |
| 36 | 36 |
| 37 using appcache::APPCACHE_FALLBACK_NAMESPACE; | |
| 38 using appcache::APPCACHE_NETWORK_NAMESPACE; | |
| 39 using appcache::AppCacheBackendImpl; | |
| 40 using appcache::AppCacheDatabase; | |
| 41 using appcache::AppCacheEntry; | |
| 42 using appcache::AppCacheFrontend; | |
| 43 using appcache::AppCacheHost; | |
| 44 using appcache::AppCacheInfo; | |
| 45 using appcache::AppCacheGroup; | |
| 46 using appcache::AppCacheServiceImpl; | |
| 47 using appcache::AppCacheStorage; | |
| 48 using appcache::AppCacheStorageImpl; | |
| 49 using appcache::AppCacheStorageReference; | |
| 50 using appcache::AppCache; | |
| 51 using appcache::AppCacheErrorDetails; | |
| 52 using appcache::AppCacheEventID; | |
| 53 using appcache::kAppCacheNoCacheId; | |
| 54 using appcache::kAppCacheNoResponseId; | |
| 55 using appcache::APPCACHE_INTERCEPT_NAMESPACE; | |
| 56 using appcache::AppCacheLogLevel; | |
| 57 using appcache::Namespace; | |
| 58 using appcache::AppCacheStatus; | |
| 59 | |
| 60 namespace content { | 37 namespace content { |
| 61 | 38 |
| 62 namespace { | 39 namespace { |
| 63 | 40 |
| 64 const base::Time kZeroTime; | 41 const base::Time kZeroTime; |
| 65 const GURL kManifestUrl("http://blah/manifest"); | 42 const GURL kManifestUrl("http://blah/manifest"); |
| 66 const GURL kManifestUrl2("http://blah/manifest2"); | 43 const GURL kManifestUrl2("http://blah/manifest2"); |
| 67 const GURL kManifestUrl3("http://blah/manifest3"); | 44 const GURL kManifestUrl3("http://blah/manifest3"); |
| 68 const GURL kEntryUrl("http://blah/entry"); | 45 const GURL kEntryUrl("http://blah/entry"); |
| 69 const GURL kEntryUrl2("http://blah/entry2"); | 46 const GURL kEntryUrl2("http://blah/entry2"); |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2041 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); | 2018 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); |
| 2042 } | 2019 } |
| 2043 | 2020 |
| 2044 TEST_F(AppCacheStorageImplTest, Reinitialize3) { | 2021 TEST_F(AppCacheStorageImplTest, Reinitialize3) { |
| 2045 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); | 2022 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); |
| 2046 } | 2023 } |
| 2047 | 2024 |
| 2048 // That's all folks! | 2025 // That's all folks! |
| 2049 | 2026 |
| 2050 } // namespace content | 2027 } // namespace content |
| OLD | NEW |