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

Unified Diff: device/bluetooth/bluez/bluetooth_bluez_unittest.cc

Issue 2389753003: Delete unused BluetoothAudioSink code. (Closed)
Patch Set: Created 4 years, 2 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
Index: device/bluetooth/bluez/bluetooth_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
index 85e12959c8f6b01d3cb67813ea3c37a1647ab668..8d9e0ae414b13e7e9deab783680e20e7d5a24cca 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -34,7 +34,6 @@
using device::BluetoothAdapter;
using device::BluetoothAdapterFactory;
-using device::BluetoothAudioSink;
using device::BluetoothDevice;
using device::BluetoothDiscoveryFilter;
using device::BluetoothDiscoverySession;
@@ -249,11 +248,6 @@ class BluetoothBlueZTest : public testing::Test {
QuitMessageLoop();
}
- void AudioSinkAcquiredCallback(scoped_refptr<BluetoothAudioSink>) {
- ++callback_count_;
- QuitMessageLoop();
- }
-
void ProfileRegisteredCallback(BluetoothAdapterProfileBlueZ* profile) {
adapter_profile_ = profile;
++callback_count_;
@@ -292,11 +286,6 @@ class BluetoothBlueZTest : public testing::Test {
last_connect_error_ = error;
}
- void AudioSinkErrorCallback(BluetoothAudioSink::ErrorCode) {
- ++error_callback_count_;
- QuitMessageLoop();
- }
-
void ErrorCompletionCallback(const std::string& error_message) {
++error_callback_count_;
QuitMessageLoop();
@@ -4261,16 +4250,6 @@ TEST_F(BluetoothBlueZTest, Shutdown) {
// CreateRfcommService will DCHECK after Shutdown().
// CreateL2capService will DCHECK after Shutdown().
- BluetoothAudioSink::Options audio_sink_options;
- adapter_->RegisterAudioSink(
- audio_sink_options,
- base::Bind(&BluetoothBlueZTest::AudioSinkAcquiredCallback,
- base::Unretained(this)),
- base::Bind(&BluetoothBlueZTest::AudioSinkErrorCallback,
- base::Unretained(this)));
- EXPECT_EQ(0, callback_count_);
- EXPECT_EQ(1, error_callback_count_--) << "RegisterAudioSink error";
-
BluetoothAdapterBlueZ* adapter_bluez =
static_cast<BluetoothAdapterBlueZ*>(adapter_.get());
EXPECT_EQ(nullptr, adapter_bluez->GetDeviceWithPath(dbus::ObjectPath("")));
@@ -4327,15 +4306,6 @@ TEST_F(BluetoothBlueZTest, Shutdown) {
adapter_bluez->OnRequestDefaultAgent();
adapter_bluez->OnRequestDefaultAgentError("", "");
- adapter_bluez->OnRegisterAudioSink(
- base::Bind(&BluetoothBlueZTest::AudioSinkAcquiredCallback,
- base::Unretained(this)),
- base::Bind(&BluetoothBlueZTest::AudioSinkErrorCallback,
- base::Unretained(this)),
- scoped_refptr<device::BluetoothAudioSink>());
- EXPECT_EQ(0, callback_count_);
- EXPECT_EQ(1, error_callback_count_--) << "RegisterAudioSink error";
-
// GetPairing will DCHECK after Shutdown().
// SetAdapter will DCHECK after Shutdown().
// SetDefaultAdapterName will DCHECK after Shutdown().
« no previous file with comments | « device/bluetooth/bluez/bluetooth_audio_sink_bluez_unittest.cc ('k') | device/bluetooth/test/mock_bluetooth_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698