After https://webrtc-review.googlesource.com/c/src/+/70740, we are creating/destroying the codecs on a task queue in the VideoStreamEncoder. This CL updates the VideoCodecTest to do the same. Also, this CL switches from manually Wait()'ing on the task queue to using TaskQueueForTest::SendTask. Bug: None Change-Id: Ia0398b24e32e9cc5361ba5ee4c08441116def18e Reviewed-on: https://webrtc-review.googlesource.com/76800 Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23257}