bluetooth: 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 Review URL: https://codereview.chromium.org/1465863003 Cr-Commit-Position: refs/heads/master@{#361040}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment