Closed Bug 1695362 Opened 11 months ago Closed 11 months ago

Add a testing ability to directly show the infobars by generating fake media error

Categories

(Core :: Audio/Video: Playback, task, P1)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

Details

Attachments

(6 files)

Proton visual refresh will be happen on Fx89, and the infobars is the part of the Proton project. There is not an easy way to display those infobars which are related with media error, so we would like to implement a way to allow QA easily to test those infobars and see if they are redesigned correctly.

Depends on D106682

Depends on D106683

Here are the steps of how we can test those infobars without having a real error.

Pre-requirement

  1. set the pref media.decoder-doctor.testing=true

Test To improve video quality, you may need to install Microsoft’s Media Feature Pack.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaWMFNeeded
  2. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  3. the infobar will show

Test To play audio, you may need to install the required PulseAudio software.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaCannotInitializePulseAudio
  2. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  3. the infobar will show

Test An error occurred while decoding a media resource.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaDecodeError
  2. set the pref media.decoder-doctor.decode-errors-allowed=*
  3. add MediaDecodeError into the pref media.decoder-doctor.notifications-allowed
  4. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  5. the infobar will show

Test A recoverable error occurred while decoding a media resource.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaDecodeWarning
  2. set the pref media.decoder-doctor.decode-warnings-allowed=*
  3. add MediaDecodeWarning into the pref media.decoder-doctor.notifications-allowed
  4. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  5. the infobar will show

Test To play video, you may need to install the required video codecs.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaPlatformDecoderNotFound
  2. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  3. the infobar will show

Test libavcodec may be vulnerable or is not supported, and should be updated to play video.

  1. set the pref media.decoder-doctor.testing.fake-error=MediaUnsupportedLibavcodec
  2. open a new tab and load url https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  3. the infobar will show
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d9d308f58bd
part1 : allow to display the infobar when testing prefs are set. r=bryce
https://hg.mozilla.org/integration/autoland/rev/c7f6feaa92d9
part2 : remove the platform check when displaying an infobar. r=bryce
https://hg.mozilla.org/integration/autoland/rev/c10a84c77c0b
part3 : add debug log for DecoderDoctorParent. r=bryce
https://hg.mozilla.org/integration/autoland/rev/ab7c4e56db27
part4 : assign the report Id in testing. r=bryce
You need to log in before you can comment on or make changes to this bug.