Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: net/disk_cache/flash/log_store_entry_unittest.cc

Issue 11532011: Renamed classes for consistency. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: test 2. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/flash/log_store_entry.cc ('k') | net/disk_cache/flash/log_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/flash/log_store_entry_unittest.cc
diff --git a/net/disk_cache/flash/cache_entry_unittest.cc b/net/disk_cache/flash/log_store_entry_unittest.cc
similarity index 60%
rename from net/disk_cache/flash/cache_entry_unittest.cc
rename to net/disk_cache/flash/log_store_entry_unittest.cc
index 206f283c16ff5f8acfc9ab1edfb2451209f348a8..8ea318666bf57837359044c751a613d379a498b7 100644
--- a/net/disk_cache/flash/cache_entry_unittest.cc
+++ b/net/disk_cache/flash/log_store_entry_unittest.cc
@@ -5,23 +5,23 @@
#include "base/memory/scoped_ptr.h"
#include "net/base/io_buffer.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/flash/cache_entry.h"
#include "net/disk_cache/flash/flash_cache_test_base.h"
#include "net/disk_cache/flash/format.h"
+#include "net/disk_cache/flash/log_store_entry.h"
#include "testing/gtest/include/gtest/gtest.h"
-using disk_cache::CacheEntry;
+using disk_cache::LogStoreEntry;
-// Tests the behavior of a CacheEntry with empty streams.
-TEST_F(FlashCacheTest, CacheEntryEmpty) {
- scoped_ptr<CacheEntry> entry(new CacheEntry(log_structured_store_.get()));
+// Tests the behavior of a LogStoreEntry with empty streams.
+TEST_F(FlashCacheTest, LogStoreEntryEmpty) {
+ scoped_ptr<LogStoreEntry> entry(new LogStoreEntry(log_store_.get()));
EXPECT_TRUE(entry->Init());
EXPECT_TRUE(entry->Close());
- entry.reset(new CacheEntry(log_structured_store_.get(), entry->id()));
+ entry.reset(new LogStoreEntry(log_store_.get(), entry->id()));
EXPECT_TRUE(entry->Init());
- for (int i = 0; i < disk_cache::kFlashCacheEntryNumStreams; ++i) {
+ for (int i = 0; i < disk_cache::kFlashLogStoreEntryNumStreams; ++i) {
const int kSize = 1024;
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSize));
EXPECT_EQ(0, entry->GetDataSize(i));
@@ -30,14 +30,15 @@ TEST_F(FlashCacheTest, CacheEntryEmpty) {
EXPECT_TRUE(entry->Close());
}
-TEST_F(FlashCacheTest, CacheEntryWriteRead) {
- scoped_ptr<CacheEntry> entry(new CacheEntry(log_structured_store_.get()));
+TEST_F(FlashCacheTest, LogStoreEntryWriteRead) {
+ scoped_ptr<LogStoreEntry> entry(new LogStoreEntry(log_store_.get()));
EXPECT_TRUE(entry->Init());
- int sizes[disk_cache::kFlashCacheEntryNumStreams] = {333, 444, 555, 666};
- scoped_refptr<net::IOBuffer> buffers[disk_cache::kFlashCacheEntryNumStreams];
+ int sizes[disk_cache::kFlashLogStoreEntryNumStreams] = {333, 444, 555, 666};
+ scoped_refptr<net::IOBuffer> buffers[
+ disk_cache::kFlashLogStoreEntryNumStreams];
- for (int i = 0; i < disk_cache::kFlashCacheEntryNumStreams; ++i) {
+ for (int i = 0; i < disk_cache::kFlashLogStoreEntryNumStreams; ++i) {
buffers[i] = new net::IOBuffer(sizes[i]);
CacheTestFillBuffer(buffers[i]->data(), sizes[i], false);
EXPECT_EQ(sizes[i], entry->WriteData(i, 0, buffers[i], sizes[i]));
@@ -45,10 +46,10 @@ TEST_F(FlashCacheTest, CacheEntryWriteRead) {
EXPECT_TRUE(entry->Close());
int32 id = entry->id();
- entry.reset(new CacheEntry(log_structured_store_.get(), id));
+ entry.reset(new LogStoreEntry(log_store_.get(), id));
EXPECT_TRUE(entry->Init());
- for (int i = 0; i < disk_cache::kFlashCacheEntryNumStreams; ++i) {
+ for (int i = 0; i < disk_cache::kFlashLogStoreEntryNumStreams; ++i) {
EXPECT_EQ(sizes[i], entry->GetDataSize(i));
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(sizes[i]));
EXPECT_EQ(sizes[i], entry->ReadData(i, 0, buffer, sizes[i]));
« no previous file with comments | « net/disk_cache/flash/log_store_entry.cc ('k') | net/disk_cache/flash/log_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698