Test that FX_TryRealloc failure leaves original contents intact

Change-Id: I2b1e5cc7a9576b5bb3bf3888225d1f6e54e0c95b
Reviewed-on: https://pdfium-review.googlesource.com/42051
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcrt/fx_memory_unittest.cpp b/core/fxcrt/fx_memory_unittest.cpp
index 8036855..8c57783 100644
--- a/core/fxcrt/fx_memory_unittest.cpp
+++ b/core/fxcrt/fx_memory_unittest.cpp
@@ -68,7 +68,9 @@
 
   ptr = FX_Alloc(int, 1);
   EXPECT_TRUE(ptr);
+  *ptr = 1492;  // Arbitrary sentinel.
   EXPECT_FALSE(FX_TryRealloc(int, ptr, kOverflowIntAlloc));
+  EXPECT_EQ(1492, *ptr);
   FX_Free(ptr);
 }
 #endif