Commit b3e76c63 authored by Alexander Timin's avatar Alexander Timin Committed by Commit Bot

[base] Fix a crash in ScopedTaskEnvironmentTest.LifetimeObserver test.

Call ScopedTaskEnvironment::SetLifetimeObserver(nullptr) to ensure that
the next test after ScopedTaskEnvironmentTest.LifetimeObserver doesn't
crash.

R=gab@chromium.org
BUG=905812

Change-Id: Ifbdcfa55695fbd5641ffccb8d3e60a80d1afb3ca
Reviewed-on: https://chromium-review.googlesource.com/c/1338090
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608899}
parent ecad200a
...@@ -346,6 +346,7 @@ TEST_F(ScopedTaskEnvironmentTest, LifetimeObserver) { ...@@ -346,6 +346,7 @@ TEST_F(ScopedTaskEnvironmentTest, LifetimeObserver) {
EXPECT_CALL(lifetime_observer, OnScopedTaskEnvironmentDestroyed()); EXPECT_CALL(lifetime_observer, OnScopedTaskEnvironmentDestroyed());
task_environment.reset(); task_environment.reset();
testing::Mock::VerifyAndClearExpectations(&lifetime_observer); testing::Mock::VerifyAndClearExpectations(&lifetime_observer);
ScopedTaskEnvironment::SetLifetimeObserver(nullptr);
} }
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
......
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