| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/browser/appcache/appcache_disk_cache.h" |
| 10 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
| 11 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "webkit/browser/appcache/appcache_disk_cache.h" | |
| 14 | |
| 15 using appcache::AppCacheDiskCache; | |
| 16 | 14 |
| 17 namespace content { | 15 namespace content { |
| 18 | 16 |
| 19 class AppCacheDiskCacheTest : public testing::Test { | 17 class AppCacheDiskCacheTest : public testing::Test { |
| 20 public: | 18 public: |
| 21 AppCacheDiskCacheTest() {} | 19 AppCacheDiskCacheTest() {} |
| 22 | 20 |
| 23 virtual void SetUp() OVERRIDE { | 21 virtual void SetUp() OVERRIDE { |
| 24 // Use the current thread for the DiskCache's cache_thread. | 22 // Use the current thread for the DiskCache's cache_thread. |
| 25 message_loop_.reset(new base::MessageLoopForIO()); | 23 message_loop_.reset(new base::MessageLoopForIO()); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 EXPECT_EQ( | 177 EXPECT_EQ( |
| 180 net::ERR_ABORTED, | 178 net::ERR_ABORTED, |
| 181 entry1->Read(0, 0, read_buf.get(), kDataLen, completion_callback_)); | 179 entry1->Read(0, 0, read_buf.get(), kDataLen, completion_callback_)); |
| 182 entry1->Close(); | 180 entry1->Close(); |
| 183 entry2->Close(); | 181 entry2->Close(); |
| 184 | 182 |
| 185 FlushCacheTasks(); | 183 FlushCacheTasks(); |
| 186 } | 184 } |
| 187 | 185 |
| 188 } // namespace content | 186 } // namespace content |
| OLD | NEW |