Add test cases to test `DecoderDoctorDiagnostics` and `DecoderDoctorDocumentWatcher`
Categories
(Core :: Audio/Video: Playback, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
Details
Attachments
(8 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Although we have browser_decoderDoctor.js
, that test is only testing the front end part, which starts from sending decoder-doctor-notification
notification.
We don't have any test to test the process of (1) setting the error flag on DecoderDoctorDiagnostics
(2) processing different error flags (3) determining if the error should be reported to the notification banner or not.
Therefore, in this bug, I will add some test cases to ensure we cover those parts.
Assignee | ||
Comment 1•5 years ago
|
||
MediaPlatformDecoderNotFound
sounds too general and seems indicating that this error is platform independent, but that is not true. This error is actually for not founding ffmpeg.
Assignee | ||
Comment 2•5 years ago
|
||
This operation is actually meaningless, because at the time we call CreateRddPDMs()
, the PDMFactory is just created. [PDMFactory()->CreatePDMs()->CreateRddPDMs()]
So that is impossible that we've failed to load ffmpeg before, so no need to subtract the FFmpegFailedToLoad
flag.
Depends on D104471
Assignee | ||
Comment 3•5 years ago
|
||
Two reasons to have this patch,
(1) we should let caller to be responsible to set the error, like what we do for WMF decoder module. DecoderDoctorDocumentWatcher
should simply relys on the flag set in DecoderDoctorDiagnostics
.
(2) separating these two different error helps us write a test for different error situation, without relying on the actual state of ffmpeglinker.
Depends on D104472
Assignee | ||
Comment 4•5 years ago
|
||
If some attributes are only able to be set in certain platform, that increase the difficulty of wrting a test.
Therefore, we make them being able to set in all platforms, but doing the check in the fianl stage, which is reporting the result, to ensure that those error would still only be displayed on the right platform.
But if we're in testing, then we can test all error types in one platform.
Depends on D104473
Assignee | ||
Comment 5•5 years ago
|
||
Add test cases for DecoderDoctorDiagnostics::StoreFormatDiagnostics()
, which is used when checking the ability of whether the decoder is supported for certain type.
Depends on D104474
Assignee | ||
Comment 6•5 years ago
|
||
I'm still working on this, and will add more test cases.
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D104475
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D104570
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D104571
Updated•5 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Backed out for bc failures on browser_decoderDoctor.js.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=331221011&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/c0f907010345f4ef9c6593408e5226e625b260eb
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
Relanded here ^
Failures were from Bug 1691499 https://hg.mozilla.org/integration/autoland/rev/36b76c196497ca9fa8ac4a95a651feffa5cad7ad
Sorry for the trouble.
Comment 14•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6f471ed33aae
https://hg.mozilla.org/mozilla-central/rev/cdc2e43b78b9
https://hg.mozilla.org/mozilla-central/rev/739bd8fadc35
https://hg.mozilla.org/mozilla-central/rev/f8a5b58b52cd
https://hg.mozilla.org/mozilla-central/rev/d43685e5850b
https://hg.mozilla.org/mozilla-central/rev/a440c4bacde1
https://hg.mozilla.org/mozilla-central/rev/c7afc5693e31
https://hg.mozilla.org/mozilla-central/rev/51161ef5f029
Description
•