| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
| (...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 MockHttpServer::GetMockUrl("manifest")); | 1739 MockHttpServer::GetMockUrl("manifest")); |
| 1740 } else { | 1740 } else { |
| 1741 ASSERT_EQ(CORRUPT_CACHE_ON_LOAD_EXISTING, test_case); | 1741 ASSERT_EQ(CORRUPT_CACHE_ON_LOAD_EXISTING, test_case); |
| 1742 // Try to access the existing cache manifest. | 1742 // Try to access the existing cache manifest. |
| 1743 // The URLRequestJob will eventually fail when it gets to disk | 1743 // The URLRequestJob will eventually fail when it gets to disk |
| 1744 // cache initialization. | 1744 // cache initialization. |
| 1745 backend_->RegisterHost(2); | 1745 backend_->RegisterHost(2); |
| 1746 AppCacheHost* host2 = backend_->GetHost(2); | 1746 AppCacheHost* host2 = backend_->GetHost(2); |
| 1747 GURL manifest_url = MockHttpServer::GetMockUrl("manifest"); | 1747 GURL manifest_url = MockHttpServer::GetMockUrl("manifest"); |
| 1748 request_ = service()->request_context()->CreateRequest( | 1748 request_ = service()->request_context()->CreateRequest( |
| 1749 manifest_url, net::DEFAULT_PRIORITY, NULL, NULL); | 1749 manifest_url, net::DEFAULT_PRIORITY, NULL); |
| 1750 AppCacheInterceptor::SetExtraRequestInfo( | 1750 AppCacheInterceptor::SetExtraRequestInfo( |
| 1751 request_.get(), service_.get(), | 1751 request_.get(), service_.get(), |
| 1752 backend_->process_id(), host2->host_id(), | 1752 backend_->process_id(), host2->host_id(), |
| 1753 ResourceType::MAIN_FRAME); | 1753 ResourceType::MAIN_FRAME); |
| 1754 request_->Start(); | 1754 request_->Start(); |
| 1755 } | 1755 } |
| 1756 | 1756 |
| 1757 PushNextTask(base::Bind( | 1757 PushNextTask(base::Bind( |
| 1758 &AppCacheStorageImplTest::Verify_Reinitialized, | 1758 &AppCacheStorageImplTest::Verify_Reinitialized, |
| 1759 base::Unretained(this), | 1759 base::Unretained(this), |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); | 2000 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); |
| 2001 } | 2001 } |
| 2002 | 2002 |
| 2003 TEST_F(AppCacheStorageImplTest, Reinitialize3) { | 2003 TEST_F(AppCacheStorageImplTest, Reinitialize3) { |
| 2004 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); | 2004 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 // That's all folks! | 2007 // That's all folks! |
| 2008 | 2008 |
| 2009 } // namespace appcache | 2009 } // namespace appcache |
| OLD | NEW |