| 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 "content/browser/appcache/appcache_host.h" |
| 6 |
| 5 #include <stdint.h> | 7 #include <stdint.h> |
| 6 | 8 |
| 9 #include <memory> |
| 10 |
| 7 #include "base/bind.h" | 11 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 11 #include "content/browser/appcache/appcache.h" | 14 #include "content/browser/appcache/appcache.h" |
| 12 #include "content/browser/appcache/appcache_backend_impl.h" | 15 #include "content/browser/appcache/appcache_backend_impl.h" |
| 13 #include "content/browser/appcache/appcache_group.h" | 16 #include "content/browser/appcache/appcache_group.h" |
| 14 #include "content/browser/appcache/appcache_host.h" | |
| 15 #include "content/browser/appcache/mock_appcache_policy.h" | 17 #include "content/browser/appcache/mock_appcache_policy.h" |
| 16 #include "content/browser/appcache/mock_appcache_service.h" | 18 #include "content/browser/appcache/mock_appcache_service.h" |
| 17 #include "net/url_request/url_request.h" | 19 #include "net/url_request/url_request.h" |
| 18 #include "storage/browser/quota/quota_manager.h" | 20 #include "storage/browser/quota/quota_manager.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 22 |
| 21 namespace content { | 23 namespace content { |
| 22 | 24 |
| 23 class AppCacheHostTest : public testing::Test { | 25 class AppCacheHostTest : public testing::Test { |
| 24 public: | 26 public: |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 EXPECT_TRUE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); | 541 EXPECT_TRUE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); |
| 540 | 542 |
| 541 // Select methods should bail if cache has already been selected. | 543 // Select methods should bail if cache has already been selected. |
| 542 EXPECT_FALSE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); | 544 EXPECT_FALSE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); |
| 543 EXPECT_FALSE(host.SelectCacheForWorker(0, 0)); | 545 EXPECT_FALSE(host.SelectCacheForWorker(0, 0)); |
| 544 EXPECT_FALSE(host.SelectCacheForSharedWorker(kAppCacheNoCacheId)); | 546 EXPECT_FALSE(host.SelectCacheForSharedWorker(kAppCacheNoCacheId)); |
| 545 EXPECT_FALSE(host.MarkAsForeignEntry(kDocAndOriginUrl, kAppCacheNoCacheId)); | 547 EXPECT_FALSE(host.MarkAsForeignEntry(kDocAndOriginUrl, kAppCacheNoCacheId)); |
| 546 } | 548 } |
| 547 | 549 |
| 548 } // namespace content | 550 } // namespace content |
| OLD | NEW |