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

Unified Diff: net/disk_cache/disk_cache_test_base.h

Issue 8463031: Disk cache: Simplyfy some of the test infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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/disk_cache_perftest.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_test_base.h
===================================================================
--- net/disk_cache/disk_cache_test_base.h (revision 109713)
+++ net/disk_cache/disk_cache_test_base.h (working copy)
@@ -7,13 +7,13 @@
#pragma once
#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "net/base/cache_type.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-class FilePath;
-
namespace net {
class IOBuffer;
@@ -34,7 +34,22 @@
// cache (and that do not need to be a DiskCacheTestWithCache) are susceptible
// to this problem; all such tests should use TEST_F(DiskCacheTest, ...).
class DiskCacheTest : public PlatformTest {
+ protected:
+ DiskCacheTest();
+ virtual ~DiskCacheTest();
+
+ // Copies a set of cache files from the data folder to the test folder.
+ bool CopyTestCache(const std::string& name);
+
+ // Deletes the contents of |cache_path_|.
+ bool CleanupCacheDir();
+
virtual void TearDown();
+
+ FilePath cache_path_;
+
+ private:
+ scoped_ptr<MessageLoop> message_loop_;
};
// Provides basic support for cache related tests.
@@ -140,7 +155,7 @@
private:
void InitMemoryCache();
void InitDiskCache();
- void InitDiskCacheImpl(const FilePath& path);
+ void InitDiskCacheImpl();
base::Thread cache_thread_;
DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache);
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698