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

Unified Diff: chrome/installer/setup/memory_unittest.cc

Issue 2727463002: mac: Several minor fixes to allocator shim. (Closed)
Patch Set: more compile error. Created 3 years, 9 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/process/memory_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/memory_unittest.cc
diff --git a/chrome/installer/setup/memory_unittest.cc b/chrome/installer/setup/memory_unittest.cc
index 30cc21a00dc4bd465202f5513bb94d39518803fe..a7968e37dcbe5cc993a34bdc117c3c34ba4efd40 100644
--- a/chrome/installer/setup/memory_unittest.cc
+++ b/chrome/installer/setup/memory_unittest.cc
@@ -9,6 +9,10 @@
#include "base/process/memory.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_MACOSX)
+#include "base/allocator/allocator_interception_mac.h"
+#endif
+
#if defined(ALLOCATOR_SHIM)
// Test that the allocator shim is in-place so that base::UncheckedMalloc works.
TEST(OutOfMemoryHandledTest, UncheckedMalloc) {
@@ -31,5 +35,9 @@ TEST(OutOfMemoryHandledTest, UncheckedMalloc) {
EXPECT_FALSE(base::UncheckedMalloc(kUnsafeMallocSize, &value));
EXPECT_EQ(nullptr, value);
+
+#if defined(OS_MACOSX)
+ base::allocator::UninterceptMallocZonesForTesting();
+#endif
}
#endif // ALLOCATOR_SHIM
« no previous file with comments | « base/process/memory_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698