• Wojciech Dzierżanowski's avatar
    Avoid race in MSE_Widevine tests · c42add43
    Wojciech Dzierżanowski authored
    When run with the stub Widevine CDM, these tests suffer from a race
    between the result of a failed StubCdm::Decrypt() and a failed
    StubCdm::UpdateSession().  The tests expect the latter, but the former
    often arrives first.
    
    By allowing the stub to InitializeVideoDecoder() successfully and
    returning cdm::kNoKey upon DecryptAndDecodeFrame() attempt we avoid the
    DecryptingDemuxerStream errors altogether, so there is no race anymore.
    
    Bug: 768745
    Test: 'browser_tests --gtest_filter=*MSE_Widevine*' pass when run with the stub Widevine CDM
    
    Change-Id: I35a35d006d118f8f7f9a8a64cf9334017644f4ea
    Reviewed-on: https://chromium-review.googlesource.com/831026Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
    Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
    Cr-Commit-Position: refs/heads/master@{#524663}
    c42add43
stub_cdm.cc 4.95 KB