Bug 1691578 - part5 : add test cases to test the ability of reporting error for not supported media type. r=bryce,emilio

Add test cases for `DecoderDoctorDiagnostics::StoreFormatDiagnostics()`, which is used when checking the ability of whether the decoder is supported for certain type.

Differential Revision: https://phabricator.services.mozilla.com/D104475
This commit is contained in:
alwu
2021-02-25 18:07:06 +00:00
parent 7ec8ae6764
commit bcfc99dc97
8 changed files with 279 additions and 14 deletions

View File

@@ -2079,6 +2079,14 @@ double HTMLMediaElement::VideoDecodeSuspendedTime() const {
return mDecoder ? mDecoder->GetVideoDecodeSuspendedTimeInSeconds() : -1.0;
}
void HTMLMediaElement::SetFormatDiagnosticsReportForMimeType(
const nsAString& aMimeType, DecoderDoctorReportType aType) {
DecoderDoctorDiagnostics diagnostics;
diagnostics.SetDecoderDoctorReportType(aType);
diagnostics.StoreFormatDiagnostics(OwnerDoc(), aMimeType, false /* can play*/,
__func__);
}
already_AddRefed<layers::Image> HTMLMediaElement::GetCurrentImage() {
MarkAsTainted();