diff --git a/test/gmock-internal-utils_test.cc b/test/gmock-internal-utils_test.cc
index f0d4567..4f00f0d 100644
--- a/test/gmock-internal-utils_test.cc
+++ b/test/gmock-internal-utils_test.cc
@@ -44,6 +44,15 @@
 #include "gtest/gtest.h"
 #include "gtest/gtest-spi.h"
 
+// Indicates that this translation unit is part of Google Test's
+// implementation.  It must come before gtest-internal-inl.h is
+// included, or there will be a compiler error.  This trick is to
+// prevent a user from accidentally including gtest-internal-inl.h in
+// his code.
+#define GTEST_IMPLEMENTATION_ 1
+#include "src/gtest-internal-inl.h"
+#undef GTEST_IMPLEMENTATION_
+
 #if GTEST_OS_CYGWIN
 # include <sys/types.h>  // For ssize_t. NOLINT
 #endif
@@ -421,27 +430,50 @@
   GMOCK_FLAG(verbose) = saved_flag;
 }
 
+struct MockStackTraceGetter : testing::internal::OsStackTraceGetterInterface {
+  virtual string CurrentStackTrace(int max_depth, int skip_count) {
+    return (testing::Message() << max_depth << "::" << skip_count << "\n")
+        .GetString();
+  }
+  virtual void UponLeavingGTest() {}
+};
+
 // Tests that in opt mode, a positive stack_frames_to_skip argument is
 // treated as 0.
 TEST(LogTest, NoSkippingStackFrameInOptMode) {
+  MockStackTraceGetter* mock_os_stack_trace_getter = new MockStackTraceGetter;
+  GetUnitTestImpl()->set_os_stack_trace_getter(mock_os_stack_trace_getter);
+
   CaptureStdout();
   Log(kWarning, "Test log.\n", 100);
   const string log = GetCapturedStdout();
 
-# if defined(NDEBUG) && GTEST_GOOGLE3_MODE_
+  string expected_trace =
+      (testing::Message() << GTEST_FLAG(stack_trace_depth) << "::").GetString();
+  string expected_message =
+      "\nGMOCK WARNING:\n"
+      "Test log.\n"
+      "Stack trace:\n" +
+      expected_trace;
+  EXPECT_THAT(log, HasSubstr(expected_message));
+  int skip_count = atoi(log.substr(expected_message.size()).c_str());
 
+# if defined(NDEBUG)
   // In opt mode, no stack frame should be skipped.
-  EXPECT_THAT(log, ContainsRegex("\nGMOCK WARNING:\n"
-                                 "Test log\\.\n"
-                                 "Stack trace:\n"
-                                 ".+"));
+  const int expected_skip_count = 0;
 # else
-
   // In dbg mode, the stack frames should be skipped.
-  EXPECT_STREQ("\nGMOCK WARNING:\n"
-               "Test log.\n"
-               "Stack trace:\n", log.c_str());
+  const int expected_skip_count = 100;
 # endif
+
+  // Note that each inner implementation layer will +1 the number to remove
+  // itself from the trace. This means that the value is a little higher than
+  // expected, but close enough.
+  EXPECT_THAT(skip_count,
+              AllOf(Ge(expected_skip_count), Le(expected_skip_count + 10)));
+
+  // Restores the default OS stack trace getter.
+  GetUnitTestImpl()->set_os_stack_trace_getter(NULL);
 }
 
 // Tests that all logs are printed when the value of the
