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

Unified Diff: base/allocator/allocator_shim_unittest.cc

Issue 2552333002: Change the CRT initialization to create a new heap for Chrome.dll. (Closed)
Patch Set: Add a test per Will's request. Created 4 years 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/allocator/allocator_shim_override_ucrt_symbols_win.h ('k') | base/trace_event/malloc_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_shim_unittest.cc
diff --git a/base/allocator/allocator_shim_unittest.cc b/base/allocator/allocator_shim_unittest.cc
index d67183ea943b9f402d7e2bd0da25bfc853952165..e45b03dc5392ae44087f41e274b62ad207eca4b0 100644
--- a/base/allocator/allocator_shim_unittest.cc
+++ b/base/allocator/allocator_shim_unittest.cc
@@ -12,6 +12,7 @@
#include <new>
#include <vector>
+#include "base/allocator/features.h"
#include "base/atomicops.h"
#include "base/process/process_metrics.h"
#include "base/synchronization/waitable_event.h"
@@ -20,7 +21,9 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if !defined(OS_WIN)
+#if defined(OS_WIN)
+#include <windows.h>
+#else
#include <unistd.h>
#endif
@@ -329,6 +332,12 @@ TEST_F(AllocatorShimTest, NewHandlerConcurrency) {
ASSERT_EQ(kNumThreads, GetNumberOfNewHandlerCalls());
}
+#if defined(OS_WIN) && BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
+TEST_F(AllocatorShimTest, ShimReplacesCRTHeapWhenEnabled) {
+ ASSERT_NE(::GetProcessHeap(), reinterpret_cast<HANDLE>(_get_heap_handle()));
+}
+#endif // defined(OS_WIN) && BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
+
} // namespace
} // namespace allocator
} // namespace base
« no previous file with comments | « base/allocator/allocator_shim_override_ucrt_symbols_win.h ('k') | base/trace_event/malloc_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698