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

Unified Diff: net/disk_cache/disk_cache_perftest.cc

Issue 8156: Switch MessagePumpForIO to use completion ports on Windows.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/cache_util_win.cc ('k') | net/disk_cache/disk_cache_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_perftest.cc
===================================================================
--- net/disk_cache/disk_cache_perftest.cc (revision 4870)
+++ net/disk_cache/disk_cache_perftest.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/file_util.h"
#include "base/perftimer.h"
+#include "base/platform_test.h"
#if defined(OS_WIN)
#include "base/scoped_handle.h"
#endif
@@ -17,7 +18,6 @@
#include "net/base/net_errors.h"
#include "net/disk_cache/block_files.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "net/disk_cache/hash.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,6 +28,8 @@
extern volatile int g_cache_tests_received;
extern volatile bool g_cache_tests_error;
+typedef PlatformTest DiskCacheTest;
+
namespace {
bool EvictFileFromSystemCache(const wchar_t* name) {
@@ -226,6 +228,7 @@
int ret = TimeWrite(num_entries, cache, &entries);
EXPECT_EQ(ret, g_cache_tests_received);
+ MessageLoop::current()->RunAllPending();
delete cache;
std::wstring filename(path);
@@ -257,6 +260,7 @@
ret = TimeRead(num_entries, cache, entries, false);
EXPECT_EQ(ret, g_cache_tests_received);
+ MessageLoop::current()->RunAllPending();
delete cache;
}
@@ -266,6 +270,7 @@
// fragmented, or if we have multiple files. This test measures that scenario,
// by using multiple, highly fragmented files.
TEST_F(DiskCacheTest, BlockFilesPerformance) {
+ MessageLoopForIO message_loop;
std::wstring path = GetCachePath();
ASSERT_TRUE(DeleteCache(path.c_str()));
@@ -303,4 +308,5 @@
}
timer2.Done();
+ MessageLoop::current()->RunAllPending();
}
« no previous file with comments | « net/disk_cache/cache_util_win.cc ('k') | net/disk_cache/disk_cache_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698