[media] When testing, call RendererWrapper::Stop() synchronously.
Before this change, the testing path invoked RenderWrapper::Stop() by posting a task, which would execute after PipelineImpl::Stop(). The production path also posts a task, but to a different thread, and PipelineImpl::Stop() waits for that task to execute before returning. This change makes the testing path more similar to the production path, by ensuring that RendererWrapper::Stop() executes before PipelineImpl::Stop() returns. The PipelineTeardownTest is also updated so that expectations on the Demuxer that Stop() the Pipeline are posted rather than directly called. This better matches the production behavior where they would be on separate threads and therefore cannot be re-entrant. Bug: 788508 Change-Id: I894ee6c2febb3b739aaa809c6aa0d9388b76b64a Reviewed-on: https://chromium-review.googlesource.com/791860 Commit-Queue: Dan Sanders <sandersd@chromium.org> Reviewed-by:Xiaohan Wang <xhwang@chromium.org> Cr-Commit-Position: refs/heads/master@{#519862}
Showing
Please register or sign in to comment