commit | 7ab03b1282bf1526e3b3619253d202d9db0fd8c3 | [log] [tgz] |
---|---|---|
author | Matt Wolenetz <wolenetz@chromium.org> | Wed Aug 09 18:32:37 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Aug 09 18:32:37 2017 |
tree | b755629344b90457179b1127288ebbfb13abdd2c | |
parent | c3eede1a1ab69196c71f1e4af865425f9c83aea1 [diff] |
Update ScopedTaskEnvironment to be resilient to tests quitting the RunLoop Various tests (such as those using PipelineIntegrationTestBase::Seek() and similar) use the (deprecated) MessageLoop::QuitWhenIdleClosure() or RunLoop::QuitCurrentWhenIdleDeprecated(). That usage was previously incompatible with ScopedTaskEnvironment::RunUntilIdle(), which expects its run_loop to execute the OnQueueEmptyClosure (which is a OnceClosure). This was causing things like media_pipeline_integration_fuzzer's ::Seek() to crash due to the Seek completion having quit the run_loop without running the ScopedTaskEnvironment's OnQueueEmptyClosure. This change implements fdoray@'s suggestion (in lieu of fixing all the related deprecated test usages for now) to just restart ScopedTaskEnvironment::RunUntilIdle() in such cases. BUG=751011,708584 R=fdoray@chromium.org TEST=Locally on linux, crashing fuzzer case runs to completion, and no media_unittests regression Change-Id: Id99fe93e1eddfaa83bc90fa1ac61ce96c5ac6999 Reviewed-on: https://chromium-review.googlesource.com/604504 Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Francois Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#493066}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .