| 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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1764 MockHttpServer::GetMockUrl("manifest")); | 1764 MockHttpServer::GetMockUrl("manifest")); |
| 1765 } else { | 1765 } else { |
| 1766 ASSERT_EQ(CORRUPT_CACHE_ON_LOAD_EXISTING, test_case); | 1766 ASSERT_EQ(CORRUPT_CACHE_ON_LOAD_EXISTING, test_case); |
| 1767 // Try to access the existing cache manifest. | 1767 // Try to access the existing cache manifest. |
| 1768 // The URLRequestJob will eventually fail when it gets to disk | 1768 // The URLRequestJob will eventually fail when it gets to disk |
| 1769 // cache initialization. | 1769 // cache initialization. |
| 1770 backend_->RegisterHost(2); | 1770 backend_->RegisterHost(2); |
| 1771 AppCacheHost* host2 = backend_->GetHost(2); | 1771 AppCacheHost* host2 = backend_->GetHost(2); |
| 1772 GURL manifest_url = MockHttpServer::GetMockUrl("manifest"); | 1772 GURL manifest_url = MockHttpServer::GetMockUrl("manifest"); |
| 1773 request_ = service()->request_context()->CreateRequest( | 1773 request_ = service()->request_context()->CreateRequest( |
| 1774 manifest_url, net::DEFAULT_PRIORITY, NULL, NULL); | 1774 manifest_url, net::DEFAULT_PRIORITY, NULL); |
| 1775 AppCacheInterceptor::SetExtraRequestInfo( | 1775 AppCacheInterceptor::SetExtraRequestInfo( |
| 1776 request_.get(), service_.get(), | 1776 request_.get(), service_.get(), |
| 1777 backend_->process_id(), host2->host_id(), | 1777 backend_->process_id(), host2->host_id(), |
| 1778 RESOURCE_TYPE_MAIN_FRAME, | 1778 RESOURCE_TYPE_MAIN_FRAME, |
| 1779 false); | 1779 false); |
| 1780 request_->Start(); | 1780 request_->Start(); |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 PushNextTask(base::Bind( | 1783 PushNextTask(base::Bind( |
| 1784 &AppCacheStorageImplTest::Verify_Reinitialized, | 1784 &AppCacheStorageImplTest::Verify_Reinitialized, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2026 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); | 2026 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); |
| 2027 } | 2027 } |
| 2028 | 2028 |
| 2029 TEST_F(AppCacheStorageImplTest, Reinitialize3) { | 2029 TEST_F(AppCacheStorageImplTest, Reinitialize3) { |
| 2030 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); | 2030 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); |
| 2031 } | 2031 } |
| 2032 | 2032 |
| 2033 // That's all folks! | 2033 // That's all folks! |
| 2034 | 2034 |
| 2035 } // namespace content | 2035 } // namespace content |
| OLD | NEW |