| 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 #include <string> | 6 #include <string> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/pickle.h" | 13 #include "base/pickle.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_response.h" |
| 16 #include "content/browser/appcache/mock_appcache_service.h" | 17 #include "content/browser/appcache/mock_appcache_service.h" |
| 17 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 18 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 19 #include "net/http/http_response_headers.h" | 20 #include "net/http/http_response_headers.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "webkit/browser/appcache/appcache_response.h" | |
| 22 | 22 |
| 23 using appcache::AppCacheStorage; | |
| 24 using appcache::AppCacheResponseInfo; | |
| 25 using appcache::AppCacheResponseReader; | |
| 26 using appcache::AppCacheResponseWriter; | |
| 27 using appcache::HttpResponseInfoIOBuffer; | |
| 28 using net::IOBuffer; | 23 using net::IOBuffer; |
| 29 using net::WrappedIOBuffer; | 24 using net::WrappedIOBuffer; |
| 30 | 25 |
| 31 namespace content { | 26 namespace content { |
| 32 | 27 |
| 33 static const int kNumBlocks = 4; | 28 static const int kNumBlocks = 4; |
| 34 static const int kBlockSize = 1024; | 29 static const int kBlockSize = 1024; |
| 35 static const int kNoSuchResponseId = 123; | 30 static const int kNoSuchResponseId = 123; |
| 36 | 31 |
| 37 class AppCacheResponseTest : public testing::Test { | 32 class AppCacheResponseTest : public testing::Test { |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 | 708 |
| 714 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { | 709 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { |
| 715 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); | 710 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); |
| 716 } | 711 } |
| 717 | 712 |
| 718 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { | 713 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { |
| 719 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); | 714 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); |
| 720 } | 715 } |
| 721 | 716 |
| 722 } // namespace content | 717 } // namespace content |
| OLD | NEW |