#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/bluetooth/floss/floss_admin_client.h"
#include <map>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/device_event_log/device_event_log.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_exported_object.h"
#include "dbus/mock_object_proxy.h"
#include "dbus/object_path.h"
#include "device/bluetooth/floss/floss_dbus_client.h"
#include "device/bluetooth/floss/floss_manager_client.h"
#include "device/bluetooth/floss/test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace floss {
namespace {
_;
DoAll;
const uint32_t kTestCallbackId = …;
constexpr size_t kUUIDSize = …;
const uint8_t kTestUuidInBytes[][kUUIDSize] = …;
const std::vector<device::BluetoothUUID> kTestUuidStr = …;
void FakeExportMethod(
const std::string& interface_name,
const std::string& method_name,
const dbus::ExportedObject::MethodCallCallback& method_call_callback,
dbus::ExportedObject::OnExportedCallback on_exported_callback) { … }
}
class FlossAdminClientTest : public testing::Test,
public FlossAdminClientObserver { … };
TEST_F(FlossAdminClientTest, TestInitExportRegisterAdmin) { … }
TEST_F(FlossAdminClientTest, TestSetServiceAllowlistBeforeInit) { … }
TEST_F(FlossAdminClientTest, TestSetServiceAllowlistAfterInit) { … }
}