Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 1465863003: bluetooth: Fix crash when trying to read or write when operation pending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address scheib's comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index 8b7f86f1f5d9cd35eb4f5f0a1c68f0b3b6d876ff..b451704d368dd1ad59241d18653e312db86a4d76 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -139,7 +139,6 @@ class TestPairingDelegate : public BluetoothDevice::PairingDelegate {
void AuthorizePairing(BluetoothDevice* device) override {}
};
-
TEST(BluetoothAdapterTest, NoDefaultPairingDelegate) {
scoped_refptr<BluetoothAdapter> adapter = new TestBluetoothAdapter();
@@ -465,9 +464,8 @@ TEST_F(BluetoothTest, DiscoverySession) {
EXPECT_TRUE(discovery_sessions_[0]->IsActive());
ResetEventCounts();
- discovery_sessions_[0]->Stop(GetCallback(), GetErrorCallback());
- EXPECT_EQ(1, callback_count_);
- EXPECT_EQ(0, error_callback_count_);
+ discovery_sessions_[0]->Stop(GetCallback(Call::EXPECTED),
+ GetErrorCallback(Call::NOT_EXPECTED));
EXPECT_FALSE(adapter_->IsDiscovering());
EXPECT_FALSE(discovery_sessions_[0]->IsActive());
}
@@ -488,7 +486,7 @@ TEST_F(BluetoothTest, NoPermissions) {
return;
}
- StartLowEnergyDiscoverySession();
+ StartLowEnergyDiscoverySessionExpectedToFail();
EXPECT_EQ(0, callback_count_);
EXPECT_EQ(1, error_callback_count_);
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698