Add unittests for mojo CDM |
|||
Issue descriptionThis is to track adding unit tests for MojoCdm / MojoCdmService. The test should cover common scenarios and connection errors. See https://codereview.chromium.org/2070753002 for an example to test MojoRenderer and MojoRendererService.
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc829a7d9755e01bf12444e6aa9c37cc074884b6 commit bc829a7d9755e01bf12444e6aa9c37cc074884b6 Author: xhwang <xhwang@chromium.org> Date: Wed Dec 07 00:57:01 2016 media: Add MockCdmClient This can be shared among multiple CDM unittests and deserve a place in mock_filters.h Also, by having a mock class, we can use StrictMock to turn uninterested mock calls into test failure, which wasn't possible with standalone MOCK_METHODs. BUG= 657069 TEST=This only refactored test infrastructure. Review-Url: https://codereview.chromium.org/2554163002 Cr-Commit-Position: refs/heads/master@{#436801} [modify] https://crrev.com/bc829a7d9755e01bf12444e6aa9c37cc074884b6/media/base/mock_filters.cc [modify] https://crrev.com/bc829a7d9755e01bf12444e6aa9c37cc074884b6/media/base/mock_filters.h [modify] https://crrev.com/bc829a7d9755e01bf12444e6aa9c37cc074884b6/media/cdm/aes_decryptor_unittest.cc [modify] https://crrev.com/bc829a7d9755e01bf12444e6aa9c37cc074884b6/media/cdm/cdm_adapter_unittest.cc
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f3429ba51d768e7461bb702afb74b234efb7337 commit 1f3429ba51d768e7461bb702afb74b234efb7337 Author: xhwang <xhwang@chromium.org> Date: Wed Dec 07 04:16:01 2016 media: Avoid access violation in MojoCdm after connection error Upon connection error during CDM initialization, after we rejected and dropped the promise, MojoCdm could be destructed. We should not try to close pending sessions in this case, and in fact we shouldn't have any sessions open before the CDM is successfully initialized. Added a unittest to cover the case where CDM creation failed due to connection error. BUG= 652856 , 657069 TEST=Manually tested. Also added a new unittest. Review-Url: https://codereview.chromium.org/2551333002 Cr-Commit-Position: refs/heads/master@{#436857} [modify] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/base/cdm_session_tracker.cc [modify] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/base/cdm_session_tracker.h [modify] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/mojo/BUILD.gn [modify] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/mojo/clients/mojo_cdm.cc [modify] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/mojo/clients/mojo_cdm.h [add] https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337/media/mojo/clients/mojo_cdm_unittest.cc
,
Dec 8 2016
We'll need more test when we fix issue 671362 . Assign to jrummell@ since he'll work on that.
,
Nov 16 2017
Marking this as fixed as mojo_cdm_unittest.cc (updated in issue 671362 ) has tests that verify what happens if a connection error happens before or after each operation. |
|||
►
Sign in to add a comment |
|||
Comment 1 by xhw...@chromium.org
, Dec 5 2016Owner: xhw...@chromium.org