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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 2807433002: SimpleCache: synchronously reply on reads from idle if data is in memory.
Patch Set: Use the proper limit for the barrier. Created 3 years, 3 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 | « net/disk_cache/disk_cache_perftest.cc ('k') | net/disk_cache/simple/simple_entry_impl.h » ('j') | no next file with comments »
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 1f552f420e0b40fbcfe0472d426e730289db643d..9dc3be57dc10942e76f36b9dea1e378a9ed7fc9c 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -571,13 +571,13 @@ void DiskCacheEntryTest::ExternalAsyncIO() {
if (net::ERR_IO_PENDING == ret)
expected++;
- EXPECT_EQ(0,
- entry->ReadData(
- 1,
- 35000,
- buffer2.get(),
- kSize2,
- base::Bind(&CallbackTest::Run, base::Unretained(&callback7))));
+ ret = entry->ReadData(
+ 1, 35000, buffer2.get(), kSize2,
+ base::Bind(&CallbackTest::Run, base::Unretained(&callback7)));
+ EXPECT_TRUE(0 == ret || net::ERR_IO_PENDING == ret);
+ if (net::ERR_IO_PENDING == ret)
+ expected++;
+
ret = entry->ReadData(
1,
0,
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/disk_cache/simple/simple_entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698