#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/midi/midi_manager_usb.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
#include <utility>
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/time/time.h"
#include "media/midi/midi_service.h"
#include "media/midi/usb_midi_device.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace midi {
namespace {
PortState;
Result;
template<typename T, size_t N>
std::vector<T> ToVector(const T (&array)[N]) { … }
class Logger { … };
class FakeUsbMidiDevice : public UsbMidiDevice { … };
class FakeMidiManagerClient : public MidiManagerClient { … };
class TestUsbMidiDeviceFactory : public UsbMidiDevice::Factory { … };
class MidiManagerUsbForTesting : public MidiManagerUsb { … };
class MidiManagerFactoryForTesting : public midi::MidiService::ManagerFactory { … };
class MidiManagerUsbTest : public ::testing::Test { … };
TEST_F(MidiManagerUsbTest, Initialize) { … }
TEST_F(MidiManagerUsbTest, InitializeMultipleDevices) { … }
TEST_F(MidiManagerUsbTest, InitializeFail) { … }
TEST_F(MidiManagerUsbTest, InitializeFailBecauseOfInvalidDescriptors) { … }
TEST_F(MidiManagerUsbTest, Send) { … }
TEST_F(MidiManagerUsbTest, SendFromCompromizedRenderer) { … }
TEST_F(MidiManagerUsbTest, Receive) { … }
TEST_F(MidiManagerUsbTest, AttachDevice) { … }
}
}