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

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

Issue 2389393005: Revert of components/arc: implement multi advertising (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb-incoming-connections
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_advertisement_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc
index bbf8b36d27fb78d13bb72410a3a04bfd6e81d53c..bc10c5f14de2a63f4c9a12cd6c18b1c1c124af02 100644
--- a/device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc
@@ -19,7 +19,6 @@
#include "device/bluetooth/bluetooth_advertisement.h"
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
#include "device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider.h"
-#include "device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h"
#include "testing/gtest/include/gtest/gtest.h"
using device::BluetoothAdapter;
@@ -208,35 +207,15 @@
ExpectSuccess();
}
-TEST_F(BluetoothAdvertisementBlueZTest, DoubleRegisterSucceeded) {
- scoped_refptr<BluetoothAdvertisement> advertisement = CreateAdvertisement();
- ExpectSuccess();
- EXPECT_TRUE(advertisement);
-
- // Creating a second advertisement should still be fine.
+TEST_F(BluetoothAdvertisementBlueZTest, DoubleRegisterFailed) {
+ scoped_refptr<BluetoothAdvertisement> advertisement = CreateAdvertisement();
+ ExpectSuccess();
+ EXPECT_TRUE(advertisement);
+
+ // Creating a second advertisement should give us an error.
scoped_refptr<BluetoothAdvertisement> advertisement2 = CreateAdvertisement();
- ExpectSuccess();
- EXPECT_TRUE(advertisement2);
-}
-
-TEST_F(BluetoothAdvertisementBlueZTest, RegisterTooManyFailed) {
- // Register the maximum available number of advertisements.
- constexpr size_t kMaxBluezAdvertisements =
- bluez::FakeBluetoothLEAdvertisingManagerClient::kMaxBluezAdvertisements;
-
- std::vector<scoped_refptr<BluetoothAdvertisement>> advertisements;
- scoped_refptr<BluetoothAdvertisement> current_advertisement;
- for (size_t i = 0; i < kMaxBluezAdvertisements; i++) {
- current_advertisement = CreateAdvertisement();
- ExpectSuccess();
- EXPECT_TRUE(current_advertisement);
- advertisements.emplace_back(std::move(current_advertisement));
- }
-
- // The next advertisement should fail to register.
- current_advertisement = CreateAdvertisement();
ExpectError(BluetoothAdvertisement::ERROR_ADVERTISEMENT_ALREADY_EXISTS);
- EXPECT_FALSE(current_advertisement);
+ EXPECT_FALSE(advertisement2);
}
TEST_F(BluetoothAdvertisementBlueZTest, DoubleUnregisterFailed) {
« no previous file with comments | « components/arc/common/bluetooth.typemap ('k') | device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698