Commit fa52ad99 authored by Helen Li's avatar Helen Li Committed by Commit Bot

Reset global scoped task environment in http_stream_factory_impl_job_controller_unittest.cc

Reset the NetTestSuite's global task environment in unit test so the MOCK_TIME
environment doesn't leak into subsequent tests.

Bug: 791804
Change-Id: Ic5df1fc6c21c7ef6b88bff2d05a68b4636b7650a
Reviewed-on: https://chromium-review.googlesource.com/807287
Commit-Queue: Helen Li <xunjieli@chromium.org>
Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521603}
parent 17513603
...@@ -1507,6 +1507,11 @@ TEST_F(HttpStreamFactoryImplJobControllerTest, ResumeMainJobLaterCanceled) { ...@@ -1507,6 +1507,11 @@ TEST_F(HttpStreamFactoryImplJobControllerTest, ResumeMainJobLaterCanceled) {
EXPECT_TRUE(job_controller_->main_job()); EXPECT_TRUE(job_controller_->main_job());
request_.reset(); request_.reset();
// Reset task environment back to the default type.
// TODO(xunjieli): Remove this temporary workaround once crbug.com/791831 is
// fixed.
NetTestSuite::SetScopedTaskEnvironment(
base::test::ScopedTaskEnvironment::MainThreadType::IO);
} }
// Test that main job is blocked for kMaxDelayTimeForMainJob(3s) if // Test that main job is blocked for kMaxDelayTimeForMainJob(3s) if
......
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