#include "device/fido/ble_adapter_manager.h"
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/functional/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "device/fido/fake_fido_discovery.h"
#include "device/fido/fido_authenticator.h"
#include "device/fido/fido_request_handler_base.h"
#include "device/fido/fido_transport_protocol.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
RunOnceClosure;
_;
BleStatus;
constexpr char kTestBluetoothDeviceAddress[] = …;
constexpr char kTestBluetoothDisplayName[] = …;
class MockObserver : public FidoRequestHandlerBase::Observer { … };
class FakeFidoRequestHandlerBase : public FidoRequestHandlerBase { … };
}
class FidoBleAdapterManagerTest : public ::testing::Test { … };
TEST_F(FidoBleAdapterManagerTest, AdapterNotPresent) { … }
TEST_F(FidoBleAdapterManagerTest, AdapaterPresentAndPowered) { … }
TEST_F(FidoBleAdapterManagerTest, AdapaterPresentAndCanBePowered) { … }
TEST_F(FidoBleAdapterManagerTest, AdapaterPresentButChromeDisallowed) { … }
TEST_F(FidoBleAdapterManagerTest, AdapaterPresentButPermissionUndetermined) { … }
TEST_F(FidoBleAdapterManagerTest, SetBluetoothPowerOn) { … }
TEST_F(FidoBleAdapterManagerTest, RequestBluetoothPermissionAllowed) { … }
TEST_F(FidoBleAdapterManagerTest, RequestBluetoothPermissionDenied) { … }
TEST_F(FidoBleAdapterManagerTest,
RequestBluetoothPermissionHandlesUndetermined) { … }
}