Descriptionbluetooth: Fix crash when trying to read or write when operation pending
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
Committed: https://crrev.com/8b6bdd4b1492c7a3607f73df02be0da625790afd
Cr-Commit-Position: refs/heads/master@{#361040}
Patch Set 1 #Patch Set 2 : Add override #
Total comments: 6
Patch Set 3 : Address scheib's comments #
Total comments: 4
Patch Set 4 : Address scheib's comments #
Messages
Total messages: 11 (3 generated)
|