NetTestSuite (net/test/net_test_suite.h) has a global ScopedTaskEnvironment of message loop type IO.
This makes testing of individual test difficult because the task environment is shared between tests. One test might have left things in the task environment which would affect subsequent tests.
As base::ScopedMockTimeMessageLoopTaskRunner is being deprecated, individual tests which want to mock out time need to use a ScopedTaskEnvironment of MOCK_TIME. Since there's already a global ScopedTaskEnvironment, individual tests can't create its own ScopedTaskEnvironment.
The ScopedTaskEnvironment should be bound to a test base class instead of the test suite.
Comment 1 by b...@chromium.org
, Dec 5 2017Owner: b...@chromium.org
Status: Started (was: Untriaged)