Commit b4704531 authored by rsesek's avatar rsesek Committed by Commit bot

Run NonThreadSafeDeathTests in the threadsafe gtest mode.

On Mac, //base/threading uses CoreFoundation, which causes forked child
processes to violate the framework's requirement that CF may not be used
after-fork-before-exec.

BUG=717490
R=mark@chromium.org

Review-Url: https://codereview.chromium.org/2865453002
Cr-Commit-Position: refs/heads/master@{#469375}
parent 71e4f4f5
...@@ -113,6 +113,7 @@ void NonThreadSafeClass::MethodOnDifferentThreadImpl() { ...@@ -113,6 +113,7 @@ void NonThreadSafeClass::MethodOnDifferentThreadImpl() {
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
TEST(NonThreadSafeDeathTest, MethodNotAllowedOnDifferentThreadInDebug) { TEST(NonThreadSafeDeathTest, MethodNotAllowedOnDifferentThreadInDebug) {
::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_DCHECK_DEATH({ NonThreadSafeClass::MethodOnDifferentThreadImpl(); }); ASSERT_DCHECK_DEATH({ NonThreadSafeClass::MethodOnDifferentThreadImpl(); });
} }
#else #else
...@@ -136,6 +137,7 @@ void NonThreadSafeClass::DestructorOnDifferentThreadImpl() { ...@@ -136,6 +137,7 @@ void NonThreadSafeClass::DestructorOnDifferentThreadImpl() {
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
TEST(NonThreadSafeDeathTest, DestructorNotAllowedOnDifferentThreadInDebug) { TEST(NonThreadSafeDeathTest, DestructorNotAllowedOnDifferentThreadInDebug) {
::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_DCHECK_DEATH( ASSERT_DCHECK_DEATH(
{ NonThreadSafeClass::DestructorOnDifferentThreadImpl(); }); { NonThreadSafeClass::DestructorOnDifferentThreadImpl(); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment