• ortuno's avatar
    bluetooth: Fix crash when trying to read or write when operation pending · 8b6bdd4b
    ortuno authored
    A return statement was missing so the callback would get called twice.
    
    To avoid future bugs in which callbacks are called unexpectedly, we
    add a new parameter to the getters of the mock callbacks. If
    Call::EXPECTED is passed then the callback is expected to be called,
    otherwise we the callback was not expected to be called and the test
    will fail.
    
    We add a TearDown implementation to BluetoothTestBase to check
    no unexpected calls have been made to callbacks.
    
    BUG=557571
    
    Review URL: https://codereview.chromium.org/1465863003
    
    Cr-Commit-Position: refs/heads/master@{#361040}
    8b6bdd4b
bluetooth_gatt_service_unittest.cc 6.29 KB