Create gtest for AudioCallbackDriver::Revive method

RESOLVED FIXED in Firefox 68

Status

()

task
P2
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: achronop, Assigned: achronop)

Tracking

66 Branch
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(4 attachments)

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 achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/21607f778c71
Move MockCubeb on a seperate reusable header. r=padenot
https://hg.mozilla.org/integration/autoland/rev/17935ce513d2
Enhance MockCubeb class to simulate a cubeb stream. r=padenot
https://hg.mozilla.org/integration/autoland/rev/70a4ba81a396
Execute revive logic in operation thread. r=padenot
https://hg.mozilla.org/integration/autoland/rev/7e8007308d0d
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.