Closed Bug 1545079 Opened 2 years ago Closed 2 years ago

Create gtest for AudioCallbackDriver::Revive method


(Core :: Audio/Video, task, P2)

66 Branch



Tracking Status
firefox68 --- fixed


(Reporter: achronop, Assigned: achronop)




(4 files)

It requires to create a fake cubeb backend and plug it in AudioCallbackDriver. The benefit is that as soon as we have it in place we can use it to test more AudioCallbackDriver methods with gtests.

The bot thinks this bug is a task, but please change it back in case of error.

Type: defect → task

Extract the existing MockCubeb logic from TestAudioDeviceEnumerator to a separate reusable header.

On MochCubeb add a fake audio thread and the corresponding methods for stream_{init,start,stop,destroy}.

IsStarted may not be updated at the time Revive() method is executed since the update of the flag happens on the async operation. This will be the case if Revive is executed right after Start. When that happens the revive method asserts that the stream is started.

Pushed by
Move MockCubeb on a seperate reusable header. r=padenot
Enhance MockCubeb class to simulate a cubeb stream. r=padenot
Execute revive logic in operation thread. r=padenot
Create a gtest that exercises revive method of AudioCallbackDriver. r=padenot
Regressions: 1552652
You need to log in before you can comment on or make changes to this bug.