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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 14130015: Support overlapping operations on the SimpleEntryImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 | « no previous file | net/disk_cache/simple/simple_entry_impl.h » ('j') | net/disk_cache/simple/simple_entry_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 96dc2635e86b3560fe154dcc21cfb6b3b9f49e33..80544ebb56afdd90ac5ea0b777b1ccbdedeb2eb7 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2118,3 +2118,97 @@ TEST_F(DiskCacheEntryTest, KeySanityCheck) {
ASSERT_NE(net::OK, OpenEntry(key, &entry));
DisableIntegrityCheck();
}
+
+// The simple cache backend isn't intended to work on windows, which has very
pasko-google - do not use 2013/04/17 15:14:46 s/windows/Windows/, also no need to mention Window
gavinp 2013/04/17 15:18:48 Also, windows isn't actually very different from w
felipeg 2013/04/17 15:53:57 Done.
felipeg 2013/04/17 15:53:57 Done.
+// different file system guarantees from Windows.
+#if !defined(OS_WIN)
+
+TEST_F(DiskCacheEntryTest, SimpleCacheInternalAsyncIO) {
+ SetSimpleCacheMode();
+ InitCache();
+ InternalAsyncIO();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheExternalAsyncIO) {
+ SetSimpleCacheMode();
+ InitCache();
+ ExternalAsyncIO();
+}
+
+// TODO(felipeg): flaky, failing to WritePlatformFile in
+// simple_synchronous_entry.cc. It failed in linux_asan bot.
+TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheReleaseBuffer) {
+ SetSimpleCacheMode();
+ InitCache();
+ ReleaseBuffer();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheStreamAccess) {
+ SetSimpleCacheMode();
+ InitCache();
+ StreamAccess();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheGetKey) {
+ SetSimpleCacheMode();
+ InitCache();
+ GetKey();
+}
+
+TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheGetTimes) {
+ SetSimpleCacheMode();
+ InitCache();
+ GetTimes();
+}
+
+TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheGrowData) {
+ SetSimpleCacheMode();
+ InitCache();
+ GrowData();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheTruncateData) {
+ SetSimpleCacheMode();
+ InitCache();
+ TruncateData();
+}
+
+TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheZeroLengthIO) {
+ SetSimpleCacheMode();
+ InitCache();
+ ZeroLengthIO();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheReuseExternalEntry) {
+ SetSimpleCacheMode();
+ SetMaxSize(200 * 1024);
+ InitCache();
+ ReuseEntry(20 * 1024);
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheReuseInternalEntry) {
+ SetSimpleCacheMode();
+ SetMaxSize(100 * 1024);
+ InitCache();
+ ReuseEntry(10 * 1024);
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheInvalidData) {
+ SetSimpleCacheMode();
+ InitCache();
+ InvalidData();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheDoomEntry) {
+ SetSimpleCacheMode();
+ InitCache();
+ DoomNormalEntry();
+}
+
+TEST_F(DiskCacheEntryTest, SimpleCacheDoomedEntry) {
+ SetSimpleCacheMode();
+ InitCache();
+ DoomedEntry();
+}
+
+#endif // !defined(OS_WIN)
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_entry_impl.h » ('j') | net/disk_cache/simple/simple_entry_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698