Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an illegal static_cast<FakeCrasAudioClient*> in AudioManagerTest.
When media_unittests runs on a VM (e.g. chromeos-amd64-generic-rel), DBusThreadManager::Initialize() will set |use_real_clients|, and cause the non-fake CrasAudioClient to be instantiated. SetUpCrasAudioHandlerWithTestingNodes() currently static_casts to the fake client unconditionally. This became a problem when the size of base::ObserverList changed in http://crrev.com/c/1242568 and the undefined behavior became damaging enough to crash the test. To fix, pass --dbus-stub on the command line to ensure DBusThreadManager creates a FakeCrasAudioClient. Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I7d5745c72e1348228382ba193b4d310b3dd2646c Reviewed-on: https://chromium-review.googlesource.com/1244180 Reviewed-by: Max Morin <[email protected]> Commit-Queue: Trent Apted <[email protected]> Cr-Commit-Position: refs/heads/master@{#594253}
- Loading branch information