Chromium Code Reviews| Index: base/process/memory_unittest.cc |
| diff --git a/base/process/memory_unittest.cc b/base/process/memory_unittest.cc |
| index 52777165a374d4cb1162ed4ef3a1e125c07fe2fa..91ea1305f6869b1c79d27eb1f8646069c1257271 100644 |
| --- a/base/process/memory_unittest.cc |
| +++ b/base/process/memory_unittest.cc |
| @@ -82,13 +82,11 @@ TEST(MemoryTest, AllocatorShimWorking) { |
| ASSERT_TRUE(base::allocator::IsAllocatorInitialized()); |
| } |
| -// Android doesn't implement set_new_handler, so we can't use the |
| -// OutOfMemoryTest cases. OpenBSD does not support these tests either. |
| -// Don't test these on ASan/TSan/MSan configurations: only test the real |
| -// allocator. |
| +// OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan |
| +// configurations: only test the real allocator. |
| // Windows only supports these tests with the allocator shim in place. |
| -#if !defined(OS_ANDROID) && !defined(OS_OPENBSD) && \ |
| - BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \ |
| +#if !defined(OS_OPENBSD) && \ |
| + BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \ |
| !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |
| namespace { |
| @@ -413,9 +411,6 @@ class OutOfMemoryHandledTest : public OutOfMemoryTest { |
| // TODO(b.kelemen): make UncheckedMalloc and UncheckedCalloc work |
| // on Windows as well. |
| -// UncheckedMalloc() and UncheckedCalloc() work as regular malloc()/calloc() |
| -// under sanitizer tools. |
| -#if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |
|
Primiano Tucci (use gerrit)
2016/08/03 11:30:14
This #if is redundant as the entire block is alrea
|
| TEST_F(OutOfMemoryHandledTest, UncheckedMalloc) { |
| EXPECT_TRUE(base::UncheckedMalloc(kSafeMallocSize, &value_)); |
| EXPECT_TRUE(value_ != NULL); |
| @@ -444,6 +439,5 @@ TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) { |
| EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_)); |
| EXPECT_TRUE(value_ == NULL); |
| } |
| -#endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |
| -#endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !(defined(OS_WIN) && |
| - // !defined(ALLOCATOR_SHIM)) && !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |
| +#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && |
| + // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |