summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/disk_cache_test_base.h
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 00:59:06 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 00:59:06 +0000
commit4d5e036157b6fa024f0a7e0659c0559bbfc8dfcb (patch)
tree6604c15b12a8452c9ee2374d776ebb5877495591 /net/disk_cache/disk_cache_test_base.h
parent1e1402c1e5399edaa536ca41d6d8ec1c0735539c (diff)
downloadchromium_src-4d5e036157b6fa024f0a7e0659c0559bbfc8dfcb.zip
chromium_src-4d5e036157b6fa024f0a7e0659c0559bbfc8dfcb.tar.gz
chromium_src-4d5e036157b6fa024f0a7e0659c0559bbfc8dfcb.tar.bz2
Run some disk cache unit tests on the Mac
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/disk_cache_test_base.h')
-rw-r--r--net/disk_cache/disk_cache_test_base.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h
index 04eb1c5..ca56be1f 100644
--- a/net/disk_cache/disk_cache_test_base.h
+++ b/net/disk_cache/disk_cache_test_base.h
@@ -2,24 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H__
-#define NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H__
+#ifndef NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_
+#define NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_
#include "base/basictypes.h"
+#include "base/platform_test.h"
#include "testing/gtest/include/gtest/gtest.h"
+// These tests can use the path service, which uses autoreleased objects on the
+// Mac, so this needs to be a PlatformTest. Even tests that do not require a
+// cache (and that do not need to be a DiskCacheTestWithCache) are susceptible
+// to this problem; all such tests should use TEST_F(DiskCacheTest, ...).
+typedef PlatformTest DiskCacheTest;
+
namespace disk_cache {
class Backend;
class BackendImpl;
class MemBackendImpl;
-}
+} // namespace disk_cache
// Provides basic support for cache related tests.
-class DiskCacheTestBase : public testing::Test {
+class DiskCacheTestWithCache : public DiskCacheTest {
protected:
- DiskCacheTestBase()
+ DiskCacheTestWithCache()
: cache_(NULL), cache_impl_(NULL), mem_cache_(NULL), mask_(0), size_(0),
memory_only_(false), implementation_(false), force_creation_(false),
first_cleanup_(true) {}
@@ -71,5 +78,4 @@ class DiskCacheTestBase : public testing::Test {
void InitDiskCache();
};
-#endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H__
-
+#endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_