In CL https://chromium-review.googlesource.com/c/chromium/src/+/1093995 (for issue 850679), I updated some of the EME browser tests to use mse_different_containers.html (as the tests need separate audio and video files which isn't handled by eme_player.html). The Android trybots (KitKat version, which doesn't support CBCS) were failing some of the new CBCS tests, so I've disabled those tests from running on Android for now.
However, the test doesn't handle all the failing conditions properly. In the examples below:
1. onSourceOpen is called twice
2. Uncaught InvalidStateError: Failed to execute 'endOfStream' on 'MediaSource'
3. Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found.
4. Uncaught InvalidStateError: Failed to execute 'appendBuffer' on 'SourceBuffer'
5. content::Shell::PlatformSetTitle(): CLEAN
Opening this bug so that the failures can be checked and the test possibly updated to properly handle these errors.
[ RUN ] MSE_ClearKey/EncryptedMediaTest.Playback_Encryption_CBCS/0
[INFO:media_browsertest.cc(57)] Running test URL: http://127.0.0.1:51367/mse_different_containers.html?keySystem=org.w3.clearkey&runEncrypted=1&videoFile=bear-640x360-v_frag-cbcs.mp4&videoFormat=video/mp4;%20codecs=%22avc1.64001E%22&audioFile=bear-640x360-a_frag-cbcs.mp4&audioFormat=audio/mp4;%20codecs=%22mp4a.40.2%22
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Test media source playback with different containers.
[INFO:CONSOLE(273)] "00:40:22.003 - Registering video event handlers."
[INFO:CONSOLE(273)] "00:40:22.006 - Setting video media keys: org.w3.clearkey"
[INFO:CONSOLE(273)] "00:40:22.067 - onSourceOpen [object Event]"
[INFO:CONSOLE(273)] "00:40:22.068 - Creating a source buffer for type video/mp4; codecs="avc1.64001E""
[INFO:CONSOLE(273)] "00:40:22.074 - Creating a source buffer for type audio/mp4; codecs="mp4a.40.2""
[INFO:CONSOLE(273)] "00:40:22.123 - End of appending buffer from bear-640x360-a_frag-cbcs.mp4"
[INFO:CONSOLE(273)] "00:40:22.126 - onSourceOpen [object Event]"
[INFO:CONSOLE(273)] "00:40:22.126 - Creating a source buffer for type video/mp4; codecs="avc1.64001E""
[INFO:CONSOLE(152)] "FAIL: Exception adding source buffer: Failed to execute 'addSourceBuffer' on 'MediaSource': The MediaSource's readyState is not 'open'."
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): FAILED
[INFO:CONSOLE(273)] "00:40:22.130 - Set document title to: FAILED, updated title: FAILED"
[INFO:CONSOLE(273)] "00:40:22.147 - onHTMLElementError CHUNK_DEMUXER_ERROR_APPEND_FAILED: Append: stream parsing failed. Data size=72990 append_window_start=0 append_window_end=Inf"
[INFO:CONSOLE(152)] "[object HTMLVideoElement].error"
[INFO:CONSOLE(273)] "00:40:22.148 - Set document title to: error, updated title: FAILED"
[INFO:CONSOLE(273)] "00:40:22.151 - End of appending buffer from bear-640x360-v_frag-cbcs.mp4"
[INFO:CONSOLE(58)] "Uncaught InvalidStateError: Failed to execute 'endOfStream' on 'MediaSource': The MediaSource's readyState is not 'open'."
[INFO:CONSOLE(273)] "00:40:22.158 - timeupdate @ 0"
[INFO:CONSOLE(0)] "Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found.", source: http://127.0.0.1:51367/mse_different_containers.html?keySystem=org.w3.clearkey&runEncrypted=1&videoFile=bear-640x360-v_frag-cbcs.mp4&videoFormat=video/mp4;%20codecs=%22avc1.64001E%22&audioFile=bear-640x360-a_frag-cbcs.mp4&audioFormat=audio/mp4;%20codecs=%22mp4a.40.2%22 (0)
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): CLEAN
../../content/browser/media/media_browsertest.cc:52: Failure
Expected equality of these values:
expected_title
Which is: "error"
final_title
Which is: "FAILED"
[ RUN ] MSE_ExternalClearKey/EncryptedMediaTest.Playback_Encryption_CBCS/0
[INFO:media_browsertest.cc(57)] Running test URL: http://127.0.0.1:34478/mse_different_containers.html?keySystem=org.chromium.externalclearkey&runEncrypted=1&videoFile=bear-640x360-v_frag-cbcs.mp4&videoFormat=video/mp4;%20codecs=%22avc1.64001E%22&audioFile=bear-640x360-a_frag-cbcs.mp4&audioFormat=audio/mp4;%20codecs=%22mp4a.40.2%22
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Test media source playback with different containers.
[INFO:CONSOLE(273)] "23:32:51.614 - Registering video event handlers."
[INFO:CONSOLE(273)] "23:32:51.617 - Setting video media keys: org.chromium.externalclearkey"
[INFO:CONSOLE(273)] "23:32:51.682 - onSourceOpen [object Event]"
[INFO:CONSOLE(273)] "23:32:51.682 - Creating a source buffer for type video/mp4; codecs="avc1.64001E""
[INFO:CONSOLE(273)] "23:32:51.688 - Creating a source buffer for type audio/mp4; codecs="mp4a.40.2""
[INFO:CONSOLE(273)] "23:32:51.734 - End of appending buffer from bear-640x360-a_frag-cbcs.mp4"
[INFO:CONSOLE(62)] "Uncaught InvalidStateError: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source."
[INFO:CONSOLE(273)] "23:32:51.743 - onHTMLElementError CHUNK_DEMUXER_ERROR_APPEND_FAILED: Append: stream parsing failed. Data size=72990 append_window_start=0 append_window_end=Inf"
[INFO:CONSOLE(152)] "[object HTMLVideoElement].error"
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): error
[INFO:CONSOLE(273)] "23:32:51.746 - Set document title to: error, updated title: error", source: http://127.0.0.1:34478/eme_player_js/utils.js (273)
[INFO:CONSOLE(273)] "23:32:51.752 - timeupdate @ 0", source: http://127.0.0.1:34478/eme_player_js/utils.js (273)
[INFO:CONSOLE(0)] "Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found.", source: http://127.0.0.1:34478/mse_different_containers.html?keySystem=org.chromium.externalclearkey&runEncrypted=1&videoFile=bear-640x360-v_frag-cbcs.mp4&videoFormat=video/mp4;%20codecs=%22avc1.64001E%22&audioFile=bear-640x360-a_frag-cbcs.mp4&audioFormat=audio/mp4;%20codecs=%22mp4a.40.2%22 (0)
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): CLEAN
[ OK ] MSE_ExternalClearKey/EncryptedMediaTest.Playback_Encryption_CBCS/0 (1895 ms)