chromium/content/browser/bluetooth/web_bluetooth_pairing_manager_impl_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/bluetooth/web_bluetooth_pairing_manager_impl.h"

#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "base/notreached.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "content/browser/bluetooth/web_bluetooth_pairing_manager.h"
#include "content/browser/bluetooth/web_bluetooth_pairing_manager_delegate.h"
#include "content/public/browser/bluetooth_delegate.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

namespace {

SingleThreadTaskEnvironment;
TestFuture;
WebBluetoothDeviceId;
WebBluetoothResult;
WebBluetoothService;
WebBluetoothWriteType;
BluetoothDevice;
MockBluetoothDevice;
Return;
PairPromptResult;

/**
 * A collection of related Bluetooth test data.
 */
struct TestData {};

// Test instance data that are valid and are the ID's of the fake objects
// managed by these tests.
const TestData kValidTestData =;

// All valid data, but does not represent any object managed by these tests.
const TestData kValidNonTestData =;

const TestData kInvalidTestData;

}  // namespace

class BluetoothPairingManagerTest : public testing::Test,
                                    public WebBluetoothPairingManagerDelegate {};

TEST_F(BluetoothPairingManagerTest, ReadSuccessfulAuthFirstSuccess) {}

TEST_F(BluetoothPairingManagerTest, ReadSuccessfulAuthSecondSuccess) {}

TEST_F(BluetoothPairingManagerTest, ReadFailAllAuthsFail) {}

TEST_F(BluetoothPairingManagerTest, ReadInvalidCharacteristicId) {}

TEST_F(BluetoothPairingManagerTest, ReadCharacteristicDeleteDelegate) {}

TEST_F(BluetoothPairingManagerTest, ReadCharacteristicDoublePair) {}

TEST_F(BluetoothPairingManagerTest,
       WriteCharacteristicSuccessfulAuthFirstSuccess) {}

TEST_F(BluetoothPairingManagerTest,
       WriteCharacteristicSuccessfulAuthSecondSuccess) {}

TEST_F(BluetoothPairingManagerTest, WriteCharacteristicFailAllAuthsFail) {}

TEST_F(BluetoothPairingManagerTest, WriteCharacteristicInvalidID) {}

TEST_F(BluetoothPairingManagerTest, WriteCharacteristicDeleteDelegate) {}

TEST_F(BluetoothPairingManagerTest, WriteCharacteristicDoublePair) {}

TEST_F(BluetoothPairingManagerTest, DescriptorReadSuccessfulAuthFirstSuccess) {}

TEST_F(BluetoothPairingManagerTest, DescriptorReadSuccessfulAuthSecondSuccess) {}

TEST_F(BluetoothPairingManagerTest, DescriptorReadFailAllAuthsFail) {}

TEST_F(BluetoothPairingManagerTest, DescriptorReadInvalidDescriptorId) {}

TEST_F(BluetoothPairingManagerTest, ReadDescriptorDeleteDelegate) {}

TEST_F(BluetoothPairingManagerTest, ReadDescriptorDoublePair) {}

TEST_F(BluetoothPairingManagerTest, WriteDescriptorSuccessfulAuthFirstSuccess) {}

TEST_F(BluetoothPairingManagerTest,
       WriteDescriptorSuccessfulAuthSecondSuccess) {}

TEST_F(BluetoothPairingManagerTest, WriteDescriptorFailAllAuthsFail) {}

TEST_F(BluetoothPairingManagerTest, WriteDescriptorInvalidID) {}

TEST_F(BluetoothPairingManagerTest, WriteDescriptorDeleteDelegate) {}

TEST_F(BluetoothPairingManagerTest, WriteDescriptorDoublePair) {}

TEST_F(BluetoothPairingManagerTest, CredentialPromptPINSuccess) {}

TEST_F(BluetoothPairingManagerTest, CredentialPromptPINCancelled) {}

TEST_F(BluetoothPairingManagerTest, CredentialPromptPasskeyCancelled) {}

TEST_F(BluetoothPairingManagerTest, PairConfirmPromptSuccess) {}

TEST_F(BluetoothPairingManagerTest, PairConfirmPromptCancelled) {}

TEST_F(BluetoothPairingManagerTest, PairConfirmPinPromptSuccess) {}

TEST_F(BluetoothPairingManagerTest, PairConfirmPinPromptCancelled) {}

TEST_F(BluetoothPairingManagerTest, StartNotificationsAllAuthsSuccess) {}

TEST_F(BluetoothPairingManagerTest, StartNotificationsAuthSecondSuccess) {}

TEST_F(BluetoothPairingManagerTest, StartNotificationsAllAuthsFail) {}

}  // namespace content