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

Unified Diff: base/memory/discardable_memory_unittest.cc

Issue 195863005: Use DiscardableMemoryManager on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add |DiscardableMemoryAshmem::is_locked| Created 6 years, 8 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
Index: base/memory/discardable_memory_unittest.cc
diff --git a/base/memory/discardable_memory_unittest.cc b/base/memory/discardable_memory_unittest.cc
index d4c295565508171dc471fbf07df535609523275e..dc0e2cd21262b4d7da8dd3edb891b91bb8f2d5b7 100644
--- a/base/memory/discardable_memory_unittest.cc
+++ b/base/memory/discardable_memory_unittest.cc
@@ -47,7 +47,7 @@ TEST_P(DiscardableMemoryTest, IsNamed) {
bool IsNativeType(DiscardableMemoryType type) {
return
- type == DISCARDABLE_MEMORY_TYPE_ANDROID ||
+ type == DISCARDABLE_MEMORY_TYPE_ASHMEM ||
type == DISCARDABLE_MEMORY_TYPE_MAC;
}
@@ -91,11 +91,8 @@ TEST_P(DiscardableMemoryTest, DeleteWhileLocked) {
ASSERT_TRUE(memory);
}
-#if !defined(OS_ANDROID)
// Test forced purging.
TEST_P(DiscardableMemoryTest, Purge) {
- ASSERT_TRUE(DiscardableMemory::PurgeForTestingSupported());
-
const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
ASSERT_TRUE(memory);
memory->Unlock();
@@ -103,7 +100,6 @@ TEST_P(DiscardableMemoryTest, Purge) {
DiscardableMemory::PurgeForTesting();
EXPECT_EQ(DISCARDABLE_MEMORY_LOCK_STATUS_PURGED, memory->Lock());
}
-#endif // !OS_ANDROID
#if !defined(NDEBUG) && !defined(OS_ANDROID)
// Death tests are not supported with Android APKs.

Powered by Google App Engine
This is Rietveld 408576698