#include "device/bluetooth/floss/floss_lescan_client.h"
#include <map>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.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 char kTestSender[] = …;
const int kTestSerial = …;
constexpr uint8_t kTestUuidByteArray[] = …;
constexpr char kTestUuidStr[] = …;
const uint8_t kTestScannerId = …;
const GattStatus kTestStatus = …;
const uint32_t kTestCallbackId = …;
constexpr char kTestDeviceName[] = …;
constexpr char kTestDeviceAddr[] = …;
const uint8_t kTestAddrType = …;
const uint16_t kTestEventType = …;
const uint8_t kTestPrimaryPhy = …;
const uint8_t kTestSecondaryPhy = …;
const uint8_t kTestAdvSid = …;
const int8_t kTestTxPower = …;
const int8_t kTestRssi = …;
const uint16_t kTestPeriodicAdvInt = …;
const uint8_t kTestFlags = …;
const uint16_t kTestManufacturerId = …;
const std::vector<uint8_t> kTestAdvData = …;
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 FlossLEScanClientTest : public testing::Test,
public ScannerClientObserver { … };
static bool ReadNullOptDBusParam(dbus::MessageReader* reader) { … }
TEST_F(FlossLEScanClientTest, TestInitExportRegisterScanner) { … }
TEST_F(FlossLEScanClientTest, TestStartStopScan) { … }
}