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

Unified Diff: base/memory/discardable_memory_manager_unittest.cc

Issue 261993003: base: Use DiscardableMemoryManager on MacOSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix initial return value of AllocateAndAcquireLock and CHECKs for allocation failure Created 6 years, 7 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 | « base/memory/discardable_memory_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_manager_unittest.cc
diff --git a/base/memory/discardable_memory_manager_unittest.cc b/base/memory/discardable_memory_manager_unittest.cc
index c59d82e51695ef8531626faa8d1934cad74a62f0..8b08cf62c48f13cefff73a97b9729089617919ec 100644
--- a/base/memory/discardable_memory_manager_unittest.cc
+++ b/base/memory/discardable_memory_manager_unittest.cc
@@ -42,9 +42,16 @@ class TestAllocationImpl : public internal::DiscardableMemoryManagerAllocation {
bool is_locked_;
};
+// Tests can assume that the default limit is at least 1024. Tests that rely on
+// something else needs to explicit set the limit.
+const size_t kDefaultMemoryLimit = 1024;
+const size_t kDefaultBytesToKeepUnderModeratePressure = kDefaultMemoryLimit;
+
class DiscardableMemoryManagerTestBase {
public:
- DiscardableMemoryManagerTestBase() {
+ DiscardableMemoryManagerTestBase()
+ : manager_(kDefaultMemoryLimit,
+ kDefaultBytesToKeepUnderModeratePressure) {
manager_.RegisterMemoryPressureListener();
}
« no previous file with comments | « base/memory/discardable_memory_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698