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

Unified Diff: device/bluetooth/test/bluetooth_test.cc

Issue 2241263005: Revert of Implement BluetoothGattNotifySession::Stop on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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 | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test.cc
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc
index 408dc82851b37ffa6896e5638a8d65c895356f25..faeb71f0e3e0dcb412d6232710477dfa38bb8190 100644
--- a/device/bluetooth/test/bluetooth_test.cc
+++ b/device/bluetooth/test/bluetooth_test.cc
@@ -132,41 +132,13 @@
void BluetoothTestBase::NotifyCallback(
Call expected,
std::unique_ptr<BluetoothGattNotifySession> notify_session) {
+ ++callback_count_;
notify_sessions_.push_back(notify_session.release());
- ++callback_count_;
- if (expected == Call::EXPECTED)
- ++actual_success_callback_calls_;
- else
- unexpected_success_callback_ = true;
-}
-
-void BluetoothTestBase::NotifyCheckForPrecedingCalls(
- int num_of_preceding_calls,
- std::unique_ptr<BluetoothGattNotifySession> notify_session) {
- EXPECT_EQ(num_of_preceding_calls, callback_count_);
-
- notify_sessions_.push_back(notify_session.release());
-
- ++callback_count_;
- ++actual_success_callback_calls_;
-}
-
-void BluetoothTestBase::StopNotifyCallback(Call expected) {
- ++callback_count_;
-
- if (expected == Call::EXPECTED)
- ++actual_success_callback_calls_;
- else
- unexpected_success_callback_ = true;
-}
-
-void BluetoothTestBase::StopNotifyCheckForPrecedingCalls(
- int num_of_preceding_calls) {
- EXPECT_EQ(num_of_preceding_calls, callback_count_);
-
- ++callback_count_;
- ++actual_success_callback_calls_;
+ if (expected == Call::EXPECTED)
+ ++actual_success_callback_calls_;
+ else
+ unexpected_success_callback_ = true;
}
void BluetoothTestBase::ReadValueCallback(Call expected,
@@ -283,27 +255,6 @@
++expected_success_callback_calls_;
return base::Bind(&BluetoothTestBase::NotifyCallback,
weak_factory_.GetWeakPtr(), expected);
-}
-
-BluetoothRemoteGattCharacteristic::NotifySessionCallback
-BluetoothTestBase::GetNotifyCheckForPrecedingCalls(int num_of_preceding_calls) {
- ++expected_success_callback_calls_;
- return base::Bind(&BluetoothTestBase::NotifyCheckForPrecedingCalls,
- weak_factory_.GetWeakPtr(), num_of_preceding_calls);
-}
-
-base::Closure BluetoothTestBase::GetStopNotifyCallback(Call expected) {
- if (expected == Call::EXPECTED)
- ++expected_success_callback_calls_;
- return base::Bind(&BluetoothTestBase::StopNotifyCallback,
- weak_factory_.GetWeakPtr(), expected);
-}
-
-base::Closure BluetoothTestBase::GetStopNotifyCheckForPrecedingCalls(
- int num_of_preceding_calls) {
- ++expected_success_callback_calls_;
- return base::Bind(&BluetoothTestBase::StopNotifyCheckForPrecedingCalls,
- weak_factory_.GetWeakPtr(), num_of_preceding_calls);
}
BluetoothRemoteGattCharacteristic::ValueCallback
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698